Mercurial > hg > CbC > CbC_llvm
comparison test/Analysis/BasicAA/full-store-partial-alias.ll @ 95:afa8332a0e37 LLVM3.8
LLVM 3.8
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Oct 2015 17:48:58 +0900 |
parents | 60c9769439b8 |
children | 803732b1fca8 |
comparison
equal
deleted
inserted
replaced
84:f3e34b893a5f | 95:afa8332a0e37 |
---|---|
1 ; RUN: opt -S -tbaa -basicaa -gvn < %s | FileCheck -check-prefix=BASICAA %s | 1 ; RUN: opt -S -tbaa -gvn < %s | FileCheck -check-prefix=BASICAA %s |
2 ; RUN: opt -S -tbaa -gvn < %s | FileCheck %s | 2 ; RUN: opt -S -tbaa -disable-basicaa -gvn < %s | FileCheck %s |
3 ; rdar://8875631, rdar://8875069 | 3 ; rdar://8875631, rdar://8875069 |
4 | 4 |
5 ; BasicAA should notice that the store stores to the entire %u object, | 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. | 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. | 7 ; Without BasicAA, TBAA should say that %tmp5 is NoAlias with the store. |
16 define i32 @signbit(double %x) nounwind { | 16 define i32 @signbit(double %x) nounwind { |
17 ; BASICAA: ret i32 %tmp5.lobit | 17 ; BASICAA: ret i32 %tmp5.lobit |
18 ; CHECK: ret i32 0 | 18 ; CHECK: ret i32 0 |
19 entry: | 19 entry: |
20 %u = alloca %union.anon, align 8 | 20 %u = alloca %union.anon, align 8 |
21 %tmp9 = getelementptr inbounds %union.anon* %u, i64 0, i32 0 | 21 %tmp9 = getelementptr inbounds %union.anon, %union.anon* %u, i64 0, i32 0 |
22 store double %x, double* %tmp9, align 8, !tbaa !0 | 22 store double %x, double* %tmp9, align 8, !tbaa !0 |
23 %tmp2 = load i32* bitcast (i64* @endianness_test to i32*), align 8, !tbaa !3 | 23 %tmp2 = load i32, i32* bitcast (i64* @endianness_test to i32*), align 8, !tbaa !3 |
24 %idxprom = sext i32 %tmp2 to i64 | 24 %idxprom = sext i32 %tmp2 to i64 |
25 %tmp4 = bitcast %union.anon* %u to [2 x i32]* | 25 %tmp4 = bitcast %union.anon* %u to [2 x i32]* |
26 %arrayidx = getelementptr inbounds [2 x i32]* %tmp4, i64 0, i64 %idxprom | 26 %arrayidx = getelementptr inbounds [2 x i32], [2 x i32]* %tmp4, i64 0, i64 %idxprom |
27 %tmp5 = load i32* %arrayidx, align 4, !tbaa !3 | 27 %tmp5 = load i32, i32* %arrayidx, align 4, !tbaa !3 |
28 %tmp5.lobit = lshr i32 %tmp5, 31 | 28 %tmp5.lobit = lshr i32 %tmp5, 31 |
29 ret i32 %tmp5.lobit | 29 ret i32 %tmp5.lobit |
30 } | 30 } |
31 | 31 |
32 !0 = !{!4, !4, i64 0} | 32 !0 = !{!4, !4, i64 0} |