[llvm] 4de58eb - [DSE][NFC] Add nounwind attribute to match test intent

via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 9 09:12:47 PDT 2022


Author: luxufan
Date: 2022-10-06T04:55:15Z
New Revision: 4de58eb432b6e82f8606735afb21ae6f476edbd7

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

LOG: [DSE][NFC] Add nounwind attribute to match test intent

Differential Revision: https://reviews.llvm.org/D135533

Added: 
    

Modified: 
    llvm/test/Transforms/DeadStoreElimination/multiblock-loops.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/DeadStoreElimination/multiblock-loops.ll b/llvm/test/Transforms/DeadStoreElimination/multiblock-loops.ll
index dbeea99bbea5..8da13e4470d5 100644
--- a/llvm/test/Transforms/DeadStoreElimination/multiblock-loops.ll
+++ b/llvm/test/Transforms/DeadStoreElimination/multiblock-loops.ll
@@ -392,19 +392,17 @@ exit:
   ret i32 %l
 }
 
-declare i1 @cond() readnone
+declare i1 @cond() readnone nounwind
 
-; TODO: We can eliminate the store in for.header, but we currently hit a MemoryPhi.
 define void @loop_multiple_def_uses(ptr noalias %P) {
 ; CHECK-LABEL: @loop_multiple_def_uses(
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    br label [[FOR_HEADER:%.*]]
 ; CHECK:       for.header:
-; CHECK-NEXT:    store i32 1, ptr [[P:%.*]], align 4
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
 ; CHECK-NEXT:    br i1 [[C1]], label [[FOR_BODY:%.*]], label [[END:%.*]]
 ; CHECK:       for.body:
-; CHECK-NEXT:    store i32 2, ptr [[P]], align 4
+; CHECK-NEXT:    store i32 2, ptr [[P:%.*]], align 4
 ; CHECK-NEXT:    [[LV:%.*]] = load i32, ptr [[P]], align 4
 ; CHECK-NEXT:    br label [[FOR_HEADER]]
 ; CHECK:       end:
@@ -436,11 +434,10 @@ define void @loop_multiple_def_uses_partial_write(ptr noalias %p) {
 ; CHECK-NEXT:  entry:
 ; CHECK-NEXT:    br label [[FOR_HEADER:%.*]]
 ; CHECK:       for.header:
-; CHECK-NEXT:    store i32 1239491, ptr [[P:%.*]], align 4
+; CHECK-NEXT:    store i32 1239297, ptr [[P:%.*]], align 4
 ; CHECK-NEXT:    [[C1:%.*]] = call i1 @cond()
 ; CHECK-NEXT:    br i1 [[C1]], label [[FOR_BODY:%.*]], label [[END:%.*]]
 ; CHECK:       for.body:
-; CHECK-NEXT:    store i8 1, ptr [[P]], align 4
 ; CHECK-NEXT:    [[LV:%.*]] = load i32, ptr [[P]], align 4
 ; CHECK-NEXT:    br label [[FOR_HEADER]]
 ; CHECK:       end:


        


More information about the llvm-commits mailing list