1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s --check-prefix=X86
3 ; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s --check-prefix=X64
5 @d.e = external dso_local unnamed_addr global i32, align 4
7 define void @PR50254() {
9 ; X86: # %bb.0: # %entry
10 ; X86-NEXT: movswl d.e, %eax
11 ; X86-NEXT: xorl %ecx, %ecx
12 ; X86-NEXT: testb %cl, %cl
13 ; X86-NEXT: jne .LBB0_2
14 ; X86-NEXT: # %bb.1: # %for.end
15 ; X86-NEXT: movw %ax, d.e
16 ; X86-NEXT: .LBB0_2: # %for.body.1
20 ; X64: # %bb.0: # %entry
21 ; X64-NEXT: movswq d.e(%rip), %rax
22 ; X64-NEXT: xorl %ecx, %ecx
23 ; X64-NEXT: testb %cl, %cl
24 ; X64-NEXT: jne .LBB0_2
25 ; X64-NEXT: # %bb.1: # %for.end
26 ; X64-NEXT: movw %ax, d.e(%rip)
27 ; X64-NEXT: .LBB0_2: # %for.body.1
30 %load = load i16, ptr @d.e, align 4
31 %xor1 = xor i16 %load, 0
32 %xor2 = xor i64 undef, 3821908120
33 %xor3 = xor i16 %load, -1
34 %xor4 = sext i16 %xor3 to i64
35 %xor5 = and i64 %xor4, 4294967295
36 %xor6 = xor i64 %xor5, 3821908120
39 for.body: ; preds = %entry
40 br i1 undef, label %for.end, label %for.body.1
42 for.end: ; preds = %for.body
43 store i16 %xor1, ptr @d.e, align 4
46 for.body.1: ; preds = %for.body
47 %add.1 = add i64 %xor6, undef