1 ; RUN: opt -aa-pipeline=tbaa -passes=gvn,instcombine -S < %s | FileCheck %s --check-prefix=TBAA
2 ; RUN: opt -aa-pipeline=basic-aa,tbaa -passes=gvn,instcombine -S < %s | FileCheck %s --check-prefix=BASICAA
4 ; According to the TBAA metadata the load and store don't alias. However,
5 ; according to the actual code, they do. Disabling basicaa shows the raw TBAA
8 target datalayout = "e-p:64:64:64"
10 ; Test for simple MustAlias aliasing.
15 ; BASICAA: ret i32 1075000115
16 define i32 @trouble(ptr %x) nounwind {
18 store i32 0, ptr %x, !tbaa !0
19 store float 0x4002666660000000, ptr %x, !tbaa !3
20 %tmp3 = load i32, ptr %x, !tbaa !0
24 ; Test for PartialAlias aliasing. GVN doesn't yet eliminate the load
25 ; in the BasicAA case.
30 ; BASICAA: ret i64 %tmp3
31 define i64 @offset(ptr %x) nounwind {
33 store i64 0, ptr %x, !tbaa !4
34 %0 = getelementptr i8, ptr %x, i64 1
35 store i8 1, ptr %0, !tbaa !5
36 %tmp3 = load i64, ptr %x, !tbaa !4