[PATCH] D17652: [CGP] Duplicate addressing computation in cold paths if required to sink addressing mode

David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 4 12:09:53 PST 2016


davidxl added a comment.

The new test cases are great.


================
Comment at: test/Transforms/CodeGenPrepare/X86/sink-addrmode.ll:7
@@ +6,3 @@
+
+; Can we sink single addressing mode computatio to use?
+define void @test1(i1 %cond, i64* %base) {
----------------
nit: computatio -- computation

================
Comment at: test/Transforms/CodeGenPrepare/X86/sink-addrmode.ll:54
@@ +53,3 @@
+; If we have two loads in the same block, only need one copy of addressing mode
+; - instruction selection will duplicate if needed
+define void @test3(i1 %cond, i64* %base) {
----------------
Do we need to add a test in Code gen to make sure the desired behavior is produced?

================
Comment at: test/Transforms/CodeGenPrepare/X86/sink-addrmode.ll:77
@@ +76,3 @@
+; Can we still sink addressing mode if there's a cold use of the
+; address itself?  
+define void @test4(i1 %cond, i64* %base) {
----------------
Add a negative case to make sure it is not enabled for optSize

================
Comment at: test/Transforms/CodeGenPrepare/X86/sink-addrmode.ll:129
@@ +128,3 @@
+
+define void @test6(i1 %cond, i64* %base) {
+; CHECK-LABEL: @test6
----------------
Add a comment for this test.


http://reviews.llvm.org/D17652





More information about the llvm-commits mailing list