[PATCH] D92817: [test] Fix scev-expander-preserve-lcssa.ll under NPM
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 7 23:00:04 PST 2020
aeubanks created this revision.
aeubanks added a reviewer: fhahn.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The NPM runs loop passes over loops in forward program order, rather
than the legacy loop PM's reverse program order. This seems to produce
better results as shown here.
I verified that changing the loop order to reverse program order results
in the same IR with the NPM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92817
Files:
llvm/test/Transforms/IndVarSimplify/scev-expander-preserve-lcssa.ll
Index: llvm/test/Transforms/IndVarSimplify/scev-expander-preserve-lcssa.ll
===================================================================
--- llvm/test/Transforms/IndVarSimplify/scev-expander-preserve-lcssa.ll
+++ llvm/test/Transforms/IndVarSimplify/scev-expander-preserve-lcssa.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -indvars -S -indvars -verify-loop-lcssa %s | FileCheck %s
+; RUN: opt -aa-pipeline=basic-aa -passes=indvars,indvars -S -verify-loop-lcssa %s | FileCheck %s
; Make sure SCEVExpander does not crash and introduce unnecessary LCSSA PHI nodes.
; The tests are a collection of cases with crashes when preserving LCSSA PHI
@@ -113,13 +113,10 @@
; CHECK: for.body84.preheader:
; CHECK-NEXT: br label [[FOR_BODY84:%.*]]
; CHECK: for.body84:
-; CHECK-NEXT: [[I_144:%.*]] = phi i32 [ [[INC:%.*]], [[IF_END106:%.*]] ], [ 0, [[FOR_BODY84_PREHEADER]] ]
; CHECK-NEXT: [[C_2:%.*]] = call i1 @cond()
-; CHECK-NEXT: br i1 [[C_2]], label [[IF_END106]], label [[RETURN_LOOPEXIT:%.*]]
+; CHECK-NEXT: br i1 [[C_2]], label [[IF_END106:%.*]], label [[RETURN_LOOPEXIT:%.*]]
; CHECK: if.end106:
-; CHECK-NEXT: [[INC]] = add nuw nsw i32 [[I_144]], 1
-; CHECK-NEXT: [[CMP82:%.*]] = icmp slt i32 [[INC]], [[I_0_LCSSA2]]
-; CHECK-NEXT: br i1 [[CMP82]], label [[FOR_BODY84]], label [[RETURN_LOOPEXIT]]
+; CHECK-NEXT: br i1 false, label [[FOR_BODY84]], label [[RETURN_LOOPEXIT]]
; CHECK: return.loopexit:
; CHECK-NEXT: br label [[RETURN]]
; CHECK: return.loopexit1:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92817.310092.patch
Type: text/x-patch
Size: 1596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201208/af558b84/attachment.bin>
More information about the llvm-commits
mailing list