summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2020-01-11 15:10:50 +0100
committerNikita Popov <nikita.ppv@gmail.com>2020-01-14 21:47:48 +0100
commit04e586151e7987089d760662126e247012431e90 (patch)
treef29a9cd115f1387e9fa5c83dba5b1294af7e344e /llvm/test/Transforms
parent651128f557229e79598e22102edb7fad3bf288c0 (diff)
downloadbcm5719-llvm-04e586151e7987089d760662126e247012431e90.tar.gz
bcm5719-llvm-04e586151e7987089d760662126e247012431e90.zip
[InstCombine] Fix worklist management when removing guard intrinsic
When multiple guard intrinsics are merged into one, currently the result of eraseInstFromFunction() is returned -- however, this should only be done if the current instruction is being removed. In this case we're removing a different instruction and should instead report that the current one has been modified by returning it. For this test case, this reduces the number of instcombine iterations from 5 to 2 (the minimum possible). Differential Revision: https://reviews.llvm.org/D72558
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/InstCombine/call-guard.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Transforms/InstCombine/call-guard.ll b/llvm/test/Transforms/InstCombine/call-guard.ll
index f018832d691..241b0788ad5 100644
--- a/llvm/test/Transforms/InstCombine/call-guard.ll
+++ b/llvm/test/Transforms/InstCombine/call-guard.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -instcombine -instcombine-infinite-loop-threshold=2 -S | FileCheck %s
; RUN: opt < %s -instcombine -S -debugify-each | FileCheck %s
declare void @llvm.experimental.guard(i1, ...)
OpenPOWER on IntegriCloud