Home | History | Annotate | Download | only in X86
      1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
      2 ; RUN: llc < %s -mattr=+avx512f | FileCheck %s  --check-prefix=CHECK --check-prefix=KNL
      3 ; RUN: llc < %s -mattr=+avx512f,+avx512vl,+avx512bw,+avx512dq | FileCheck %s  --check-prefix=CHECK --check-prefix=SKX
      4 
      5 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
      6 target triple = "x86_64-unknown-linux-gnu"
      7 
      8 define i64 @foo64(i1 zeroext %i) #0 {
      9 ; CHECK-LABEL: foo64:
     10 ; CHECK:       # %bb.0:
     11 ; CHECK-NEXT:    movzbl %dil, %eax
     12 ; CHECK-NEXT:    orq $-2, %rax
     13 ; CHECK-NEXT:    retq
     14   br label %bb
     15 
     16 bb:
     17   %z = zext i1 %i to i64
     18   %v = or i64 %z, -2
     19   br label %end
     20 
     21 end:
     22   ret i64 %v
     23 }
     24 
     25 define i16 @foo16(i1 zeroext %i) #0 {
     26 ; CHECK-LABEL: foo16:
     27 ; CHECK:       # %bb.0:
     28 ; CHECK-NEXT:    movzbl %dil, %eax
     29 ; CHECK-NEXT:    orl $65534, %eax # imm = 0xFFFE
     30 ; CHECK-NEXT:    # kill: def $ax killed $ax killed $eax
     31 ; CHECK-NEXT:    retq
     32   br label %bb
     33 
     34 bb:
     35   %z = zext i1 %i to i16
     36   %v = or i16 %z, -2
     37   br label %end
     38 
     39 end:
     40   ret i16 %v
     41 }
     42 
     43 define i16 @foo16_1(i1 zeroext %i, i32 %j) #0 {
     44 ; CHECK-LABEL: foo16_1:
     45 ; CHECK:       # %bb.0:
     46 ; CHECK-NEXT:    movzbl %dil, %eax
     47 ; CHECK-NEXT:    orl $2, %eax
     48 ; CHECK-NEXT:    # kill: def $ax killed $ax killed $eax
     49 ; CHECK-NEXT:    retq
     50   br label %bb
     51 
     52 bb:
     53   %z = zext i1 %i to i16
     54   %v = or i16 %z, 2
     55   br label %end
     56 
     57 end:
     58   ret i16 %v
     59 }
     60 
     61 define i32 @foo32(i1 zeroext %i) #0 {
     62 ; CHECK-LABEL: foo32:
     63 ; CHECK:       # %bb.0:
     64 ; CHECK-NEXT:    movzbl %dil, %eax
     65 ; CHECK-NEXT:    orl $-2, %eax
     66 ; CHECK-NEXT:    retq
     67   br label %bb
     68 
     69 bb:
     70   %z = zext i1 %i to i32
     71   %v = or i32 %z, -2
     72   br label %end
     73 
     74 end:
     75   ret i32 %v
     76 }
     77 
     78 define i8 @foo8(i1 zeroext %i) #0 {
     79 ; CHECK-LABEL: foo8:
     80 ; CHECK:       # %bb.0:
     81 ; CHECK-NEXT:    orb $-2, %dil
     82 ; CHECK-NEXT:    movl %edi, %eax
     83 ; CHECK-NEXT:    retq
     84   br label %bb
     85 
     86 bb:
     87   %z = zext i1 %i to i8
     88   %v = or i8 %z, -2
     89   br label %end
     90 
     91 end:
     92   ret i8 %v
     93 }
     94 
     95