brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 7a98201 Raw
36 lines · plain
1; RUN: opt -S -aa-pipeline=basic-aa,tbaa -passes=gvn < %s | FileCheck -check-prefix=BASICAA %s2; RUN: opt -S -aa-pipeline=tbaa -passes=gvn < %s | FileCheck %s3; rdar://8875631, rdar://88750694 5; BasicAA should notice that the store stores to the entire %u object,6; so the %tmp5 load is PartialAlias with the store and suppress TBAA.7; Without BasicAA, TBAA should say that %tmp5 is NoAlias with the store.8 9target datalayout = "e-p:64:64:64"10 11%union.anon = type { double }12 13@u = global %union.anon { double -2.500000e-01 }, align 814@endianness_test = global i64 1, align 815 16define i32 @signbit(double %x) nounwind {17; BASICAA: ret i32 %tmp5.lobit18; CHECK:   ret i32 019entry:20  %u = alloca %union.anon, align 821  store double %x, ptr %u, align 8, !tbaa !022  %tmp2 = load i32, ptr @endianness_test, align 8, !tbaa !323  %idxprom = sext i32 %tmp2 to i6424  %arrayidx = getelementptr inbounds [2 x i32], ptr %u, i64 0, i64 %idxprom25  %tmp5 = load i32, ptr %arrayidx, align 4, !tbaa !326  %tmp5.lobit = lshr i32 %tmp5, 3127  ret i32 %tmp5.lobit28}29 30!0 = !{!4, !4, i64 0}31!1 = !{!"omnipotent char", !2}32!2 = !{!"Simple C/C++ TBAA"}33!3 = !{!5, !5, i64 0}34!4 = !{!"double", !1}35!5 = !{!"int", !1}36