[PATCH] D42165: [SCEV] Fix isLoopEntryGuardedByCond usage
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 21 21:21:19 PST 2018
mkazantsev accepted this revision.
mkazantsev added a comment.
This revision is now accepted and ready to land.
LGTM with nits (see comments to the test).
================
Comment at: test/Transforms/IndVarSimplify/inner-loop.ll:3
+
+; This is regression test for the bug in ScalarEvolution::isKnownPredicate
+
----------------
Could you please give some more details on this bug here? It is not clear what problem are you addressing. Either a comment or a reference on bugs.llvm.com would work.
================
Comment at: test/Transforms/IndVarSimplify/inner-loop.ll:33
+ %s = select i1 %cmp, i32 %i, i32 %j
+; Select should be simplified due to in case
+; %i == 26 and %j == 27, %s should be equal to %j.
----------------
should be -> should not be
due to in case -> because if
================
Comment at: test/Transforms/IndVarSimplify/inner-loop.ll:35
+; %i == 26 and %j == 27, %s should be equal to %j.
+; Within a bug the instrction is simplified to
+; %s = select i1 true, i32 %0, i32 %j
----------------
Within a bug -> Due to the bug?
instrction -> instruction
================
Comment at: test/Transforms/IndVarSimplify/inner-loop.ll:37
+; %s = select i1 true, i32 %0, i32 %j
+; CHECK: %s = select i1 %cmp
+ call void @bar(i32 %s)
----------------
Maybe add `CHECK-NOT: select i1 true`?
https://reviews.llvm.org/D42165
More information about the llvm-commits
mailing list