| ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6 |
| ; RUN: llc < %s -mtriple=x86_64-- -mattr=+avx512f,+avx512vl | FileCheck %s --check-prefixes=CHECK |
| |
| define <8 x i64> @foo(<8 x i64> %a, <8 x i64> %b, <8 x i64> %c) { |
| ; CHECK-LABEL: foo: |
| ; CHECK: # %bb.0: |
| ; CHECK-NEXT: vpternlogq {{.*#+}} zmm0 = ~(zmm0 | zmm2 | zmm1) |
| ; CHECK-NEXT: retq |
| %and.demorgan = or <8 x i64> %b, %a |
| %and3.demorgan = or <8 x i64> %and.demorgan, %c |
| %and3 = xor <8 x i64> %and3.demorgan, splat (i64 -1) |
| ret <8 x i64> %and3 |
| } |
| |
| define <8 x i64> @xorbitcast(<64 x i8> %a, <64 x i8> %b, <64 x i8> %c) { |
| ; CHECK-LABEL: xorbitcast: |
| ; CHECK: # %bb.0: |
| ; CHECK-NEXT: vpternlogq {{.*#+}} zmm0 = ~(zmm0 | zmm2 | zmm1) |
| ; CHECK-NEXT: retq |
| %or1 = or <64 x i8> %a, %b |
| %or2 = or <64 x i8> %or1, %c |
| %cast = bitcast <64 x i8> %or2 to <8 x i64> |
| %xor = xor <8 x i64> %cast, splat (i64 -1) |
| ret <8 x i64> %xor |
| } |