[PATCH] D72944: [InstCombine] Fix worklist management when simplifying demanded bits (PR44541)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 09:03:07 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1ab37fad61ab: [InstCombine] Fix worklist management when simplifying demanded bits (authored by nikic).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72944/new/
https://reviews.llvm.org/D72944
Files:
llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
llvm/test/Transforms/InstCombine/pr44541.ll
llvm/test/Transforms/InstCombine/select-imm-canon.ll
Index: llvm/test/Transforms/InstCombine/select-imm-canon.ll
===================================================================
--- llvm/test/Transforms/InstCombine/select-imm-canon.ll
+++ llvm/test/Transforms/InstCombine/select-imm-canon.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -instcombine -instcombine-infinite-loop-threshold=3 -S | FileCheck %s
define i8 @single(i32 %A) {
; CHECK-LABEL: @single(
Index: llvm/test/Transforms/InstCombine/pr44541.ll
===================================================================
--- llvm/test/Transforms/InstCombine/pr44541.ll
+++ llvm/test/Transforms/InstCombine/pr44541.ll
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
-; RUN: opt -S -instcombine -expensive-combines=0 -instcombine-infinite-loop-threshold=3 < %s | FileCheck %s
+; RUN: opt -S -instcombine -expensive-combines=0 -instcombine-infinite-loop-threshold=2 < %s | FileCheck %s
; This test used to cause an infinite combine loop.
Index: llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
===================================================================
--- llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
@@ -88,6 +88,8 @@
Depth, I);
if (!NewVal) return false;
U = NewVal;
+ // Add the simplified instruction back to the worklist.
+ Worklist.addValue(U.get());
return true;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72944.245182.patch
Type: text/x-patch
Size: 1608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200218/df208ef7/attachment.bin>
More information about the llvm-commits
mailing list