1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s
4 @var_3 = external global i16, align 2
5 @var_13 = external global i16, align 2
6 @var_212 = external global i64, align 8
8 define void @pr34127() {
9 ; CHECK-LABEL: pr34127:
10 ; CHECK: # %bb.0: # %entry
11 ; CHECK-NEXT: movzwl {{.*}}(%rip), %eax
12 ; CHECK-NEXT: movzwl {{.*}}(%rip), %ecx
13 ; CHECK-NEXT: andl %eax, %ecx
14 ; CHECK-NEXT: movl %eax, %edx
15 ; CHECK-NEXT: andl %ecx, %edx
16 ; CHECK-NEXT: movzwl %dx, %edx
17 ; CHECK-NEXT: movl %edx, -{{[0-9]+}}(%rsp)
18 ; CHECK-NEXT: xorl %edx, %edx
19 ; CHECK-NEXT: testw %cx, %ax
20 ; CHECK-NEXT: sete %dl
21 ; CHECK-NEXT: andl %eax, %edx
22 ; CHECK-NEXT: movq %rdx, {{.*}}(%rip)
23 ; CHECK-NEXT: movw $0, (%rax)
26 %a = alloca i32, align 4
27 %0 = load i16, i16* @var_3, align 2
28 %conv = zext i16 %0 to i32
29 %1 = load i16, i16* @var_3, align 2
30 %conv1 = zext i16 %1 to i32
31 %2 = load i16, i16* @var_13, align 2
32 %conv2 = zext i16 %2 to i32
33 %and = and i32 %conv1, %conv2
34 %and3 = and i32 %conv, %and
35 store i32 %and3, i32* %a, align 4
36 %3 = load i16, i16* @var_3, align 2
37 %conv4 = zext i16 %3 to i32
38 %4 = load i16, i16* @var_3, align 2
39 %conv5 = zext i16 %4 to i32
40 %5 = load i16, i16* @var_13, align 2
41 %conv6 = zext i16 %5 to i32
42 %and7 = and i32 %conv5, %conv6
43 %and8 = and i32 %conv4, %and7
44 %tobool = icmp ne i32 %and8, 0
45 %lnot = xor i1 %tobool, true
46 %conv9 = zext i1 %lnot to i32
47 %6 = load i16, i16* @var_3, align 2
48 %conv10 = zext i16 %6 to i32
49 %and11 = and i32 %conv9, %conv10
50 %conv12 = sext i32 %and11 to i64
51 store i64 %conv12, i64* @var_212, align 8
52 %conv14 = zext i1 undef to i16
53 store i16 %conv14, i16* undef, align 2