1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=i386-unknown-linux-gnu < %s | FileCheck %s
4 @c = external dso_local global [1 x i32], align 4
6 define void @fn1(i32 %k, ptr %p) {
9 ; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
10 ; CHECK-NEXT: shll $2, %eax
11 ; CHECK-NEXT: leal c(%eax), %ecx
12 ; CHECK-NEXT: xorl %edx, %edx
13 ; CHECK-NEXT: cmpl %ecx, {{[0-9]+}}(%esp)
14 ; CHECK-NEXT: setne %dl
15 ; CHECK-NEXT: addl $c, %eax
16 ; CHECK-NEXT: movl %edx, (%eax)
17 ; CHECK-NEXT: je .LBB0_1
18 ; CHECK-NEXT: # %bb.2: # %r
20 ; CHECK-NEXT: .LBB0_1: # %u
21 %g = getelementptr inbounds [1 x i32], ptr @c, i32 0, i32 %k
22 %cmp = icmp ne ptr %p, %g
23 %z = zext i1 %cmp to i32
24 store i32 %z, ptr undef, align 4
25 %cmp2 = icmp eq ptr %g, null
26 br i1 %cmp2, label %u, label %r