[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / llvm / test / Transforms / EarlyCSE / flags.ll
blob487ef5ef1a1175ab9d226b3fd0040a557ea2d59f
1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -early-cse -earlycse-debug-hash -S < %s | FileCheck %s
3 ; RUN: opt -basic-aa -early-cse-memssa -S < %s | FileCheck %s
5 declare void @use(i1)
7 define void @test1(float %x, float %y) {
8 ; CHECK-LABEL: @test1(
9 ; CHECK-NEXT:    [[CMP1:%.*]] = fcmp oeq float [[Y:%.*]], [[X:%.*]]
10 ; CHECK-NEXT:    call void @use(i1 [[CMP1]])
11 ; CHECK-NEXT:    call void @use(i1 [[CMP1]])
12 ; CHECK-NEXT:    ret void
14   %cmp1 = fcmp nnan oeq float %y, %x
15   %cmp2 = fcmp oeq float %x, %y
16   call void @use(i1 %cmp1)
17   call void @use(i1 %cmp2)
18   ret void
21 declare void @use.i8(i8*)
23 define void @test_inbounds_program_ub_if_first_gep_poison(i8* %ptr, i64 %n) {
24 ; CHECK-LABEL: @test_inbounds_program_ub_if_first_gep_poison(
25 ; CHECK-NEXT:    [[ADD_PTR_1:%.*]] = getelementptr inbounds i8, i8* [[PTR:%.*]], i64 [[N:%.*]]
26 ; CHECK-NEXT:    call void @use.i8(i8* noundef [[ADD_PTR_1]])
27 ; CHECK-NEXT:    call void @use.i8(i8* [[ADD_PTR_1]])
28 ; CHECK-NEXT:    ret void
30   %add.ptr.1 = getelementptr inbounds i8, i8* %ptr, i64 %n
31   call void @use.i8(i8* noundef %add.ptr.1)
32   %add.ptr.2 = getelementptr i8, i8* %ptr, i64 %n
33   call void @use.i8(i8* %add.ptr.2)
34   ret void
37 define void @test_inbounds_program_not_ub_if_first_gep_poison(i8* %ptr, i64 %n) {
38 ; CHECK-LABEL: @test_inbounds_program_not_ub_if_first_gep_poison(
39 ; CHECK-NEXT:    [[ADD_PTR_1:%.*]] = getelementptr i8, i8* [[PTR:%.*]], i64 [[N:%.*]]
40 ; CHECK-NEXT:    call void @use.i8(i8* [[ADD_PTR_1]])
41 ; CHECK-NEXT:    call void @use.i8(i8* [[ADD_PTR_1]])
42 ; CHECK-NEXT:    ret void
44   %add.ptr.1 = getelementptr inbounds i8, i8* %ptr, i64 %n
45   call void @use.i8(i8* %add.ptr.1)
46   %add.ptr.2 = getelementptr i8, i8* %ptr, i64 %n
47   call void @use.i8(i8* %add.ptr.2)
48   ret void