[X86][SSE] Added tests for insertion of zero elements into vectors
[oota-llvm.git] / test / CodeGen / X86 / constant-hoisting-cmp.ll
1 ; RUN: llc < %s -O3 -march=x86-64 |FileCheck %s
2 define i64 @foo(i64 %data1, i64 %data2, i64 %data3)
3 {
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.
6 entry:
7   %val1 = add i64 %data3, 1
8   %x = icmp ugt i64 %data1, 4294967295
9   br i1 %x, label %End, label %L_val2
10
11 ; CHECK: shrq    $32, {{.*}}
12 ; CHECK: shrq    $32, {{.*}}
13 L_val2:
14   %val2 = add i64 %data3, 2
15   %y = icmp ugt i64 %data2, 4294967295
16   br i1 %y, label %End, label %L_val3
17
18 L_val3:
19   %val3 = add i64 %data3, 3
20   br label %End
21
22 End:
23   %p1 = phi i64 [%val1,%entry], [%val2,%L_val2], [%val3,%L_val3]
24   ret i64 %p1
25 }