[llvm-branch-commits] [llvm] b5e8de9 - [BasicAA] Add tests for suboptimal speculation results (NFC)

Nikita Popov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sat Nov 28 10:20:55 PST 2020


Author: Nikita Popov
Date: 2020-11-28T19:16:17+01:00
New Revision: b5e8de9c7903d458b098a8af03939384270c1a5e

URL: https://github.com/llvm/llvm-project/commit/b5e8de9c7903d458b098a8af03939384270c1a5e
DIFF: https://github.com/llvm/llvm-project/commit/b5e8de9c7903d458b098a8af03939384270c1a5e.diff

LOG: [BasicAA] Add tests for suboptimal speculation results (NFC)

While we determine that (phi1, phi2) is noalias, we don't
determine that (gep phi1 + 1, gep phi2 + 1) are also noalias.

Added: 
    

Modified: 
    llvm/test/Analysis/BasicAA/phi-speculation.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Analysis/BasicAA/phi-speculation.ll b/llvm/test/Analysis/BasicAA/phi-speculation.ll
index 12b2310f4c45..2014fb5158d4 100644
--- a/llvm/test/Analysis/BasicAA/phi-speculation.ll
+++ b/llvm/test/Analysis/BasicAA/phi-speculation.ll
@@ -6,6 +6,8 @@ target datalayout =
 ; ptr_phi and ptr2_phi do not alias.
 ; CHECK: test_noalias_1
 ; CHECK: NoAlias: i32* %ptr2_phi, i32* %ptr_phi
+; CHECK: MayAlias: i32* %ptr2_inc, i32* %ptr_inc
+; TODO: The incs should also be NoAlias.
 define i32 @test_noalias_1(i32* %ptr2, i32 %count, i32* %coeff) {
 entry:
   %ptr = getelementptr inbounds i32, i32* %ptr2, i64 1
@@ -34,7 +36,10 @@ the_exit:
 
 ; CHECK: test_noalias_2
 ; CHECK: NoAlias: i32* %ptr_outer_phi, i32* %ptr_outer_phi2
+; CHECK: MayAlias: i32* %ptr2_inc_outer, i32* %ptr_inc_outer
 ; CHECK: NoAlias: i32* %ptr2_phi, i32* %ptr_phi
+; CHECK: MayAlias: i32* %ptr2_inc, i32* %ptr_inc
+; TODO: The incs should also be NoAlias.
 define i32 @test_noalias_2(i32* %ptr2, i32 %count, i32* %coeff) {
 entry:
   %ptr = getelementptr inbounds i32, i32* %ptr2, i64 1


        


More information about the llvm-branch-commits mailing list