1 ; RUN: opt < %s -S -early-cse | FileCheck %s
2 ; RUN: opt < %s -S -basicaa -early-cse-memssa | FileCheck %s
5 define void @test1(float %A, float %B, float* %PA, float* %PB) {
10 %C = fadd float %A, %B
11 store float %C, float* %PA
12 %D = fadd float %B, %A
13 store float %D, float* %PB
17 ; CHECK-LABEL: @test2(
18 define void @test2(float %A, float %B, i1* %PA, i1* %PB) {
23 %C = fcmp oeq float %A, %B
25 %D = fcmp oeq float %B, %A
30 ; CHECK-LABEL: @test3(
31 define void @test3(float %A, float %B, i1* %PA, i1* %PB) {
36 %C = fcmp uge float %A, %B
38 %D = fcmp ule float %B, %A
43 ; CHECK-LABEL: @test4(
44 define void @test4(i32 %A, i32 %B, i1* %PA, i1* %PB) {
49 %C = icmp eq i32 %A, %B
51 %D = icmp eq i32 %B, %A
56 ; CHECK-LABEL: @test5(
57 define void @test5(i32 %A, i32 %B, i1* %PA, i1* %PB) {
62 %C = icmp sgt i32 %A, %B
64 %D = icmp slt i32 %B, %A