1 ; RUN: llc < %s -O3 -mtriple=x86_64-- |FileCheck %s
2 define i64 @foo(i64 %data1, i64 %data2, i64 %data3)
4 ; If constant 4294967295 is hoisted to a variable, then we won't be able to
5 ; use a shift right by 32 to optimize the compare.
7 %val1 = add i64 %data3, 1
8 %x = icmp ugt i64 %data1, 4294967295
9 br i1 %x, label %End, label %L_val2
11 ; CHECK: shrq $32, {{.*}}
12 ; CHECK: shrq $32, {{.*}}
14 %val2 = add i64 %data3, 2
15 %y = icmp ugt i64 %data2, 4294967295
16 br i1 %y, label %End, label %L_val3
19 %val3 = add i64 %data3, 3
23 %p1 = phi i64 [%val1,%entry], [%val2,%L_val2], [%val3,%L_val3]