Home | History | Annotate | Download | only in X86
      1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
      2 ; RUN: llc -mtriple=x86_64-unknown-linux-gnu %s -o - | FileCheck %s
      3 
      4 @ll = local_unnamed_addr global i64 0, align 8
      5 @x = local_unnamed_addr global i64 2651237805702985558, align 8
      6 @s1 = local_unnamed_addr global { i8, i8 } { i8 123, i8 5 }, align 2
      7 @s2 = local_unnamed_addr global { i8, i8 } { i8 -122, i8 3 }, align 2
      8 
      9 define void @PR35765() {
     10 ; CHECK-LABEL: PR35765:
     11 ; CHECK:       # %bb.0: # %entry
     12 ; CHECK-NEXT:    movzwl {{.*}}(%rip), %ecx
     13 ; CHECK-NEXT:    addl $-1398, %ecx # imm = 0xFA8A
     14 ; CHECK-NEXT:    movl $4, %eax
     15 ; CHECK-NEXT:    # kill: def $cl killed $cl killed $ecx
     16 ; CHECK-NEXT:    shll %cl, %eax
     17 ; CHECK-NEXT:    movzwl {{.*}}(%rip), %ecx
     18 ; CHECK-NEXT:    movzwl {{.*}}(%rip), %edx
     19 ; CHECK-NEXT:    notl %edx
     20 ; CHECK-NEXT:    orl $63488, %edx # imm = 0xF800
     21 ; CHECK-NEXT:    movzwl %dx, %edx
     22 ; CHECK-NEXT:    orl %ecx, %edx
     23 ; CHECK-NEXT:    xorl %eax, %edx
     24 ; CHECK-NEXT:    movslq %edx, %rax
     25 ; CHECK-NEXT:    movq %rax, {{.*}}(%rip)
     26 ; CHECK-NEXT:    retq
     27 entry:
     28   %bf.load.i = load i16, i16* bitcast ({ i8, i8 }* @s1 to i16*), align 2
     29   %bf.clear.i = and i16 %bf.load.i, 2047
     30   %conv.i = zext i16 %bf.clear.i to i32
     31   %sub.i = add nsw i32 %conv.i, -1398
     32   %shl.i = shl i32 4, %sub.i
     33   %0 = load i64, i64* @x, align 8
     34   %bf.load1.i = load i16, i16* bitcast ({ i8, i8 }* @s2 to i16*), align 2
     35   %bf.clear2.i = and i16 %bf.load1.i, 2047
     36   %1 = xor i16 %bf.clear2.i, -1
     37   %neg.i = zext i16 %1 to i64
     38   %or.i = or i64 %0, %neg.i
     39   %conv5.i = trunc i64 %or.i to i32
     40   %conv6.i = and i32 %conv5.i, 65535
     41   %xor.i = xor i32 %conv6.i, %shl.i
     42   %conv7.i = sext i32 %xor.i to i64
     43   store i64 %conv7.i, i64* @ll, align 8
     44   ret void
     45 }
     46