[PATCH] D29015: [LoopUnswitch] Fix introduction of UB when hoisted condition may be undef or poison

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 00:41:24 PST 2020


aqjune updated this revision to Diff 242267.
aqjune added a comment.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

- Target SimpleLoopUnswitch to fix introduction of UB
- Use ICFLoopSafetyInfo::isGuaranteedToExecute to not freeze condition if hoisted branch is guaranteed to be reachable

The second change was necessary to minimize the updates at unit tests.
(which was https://reviews.llvm.org/D29016 , but it needed only small amount of change so I moved it to here)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D29015/new/

https://reviews.llvm.org/D29015

Files:
  llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
  llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested.ll
  llvm/test/Transforms/SimpleLoopUnswitch/exponential-nontrivial-unswitch-nested2.ll
  llvm/test/Transforms/SimpleLoopUnswitch/exponential-switch-unswitch.ll
  llvm/test/Transforms/SimpleLoopUnswitch/guards.ll
  llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch-cost.ll
  llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29015.242267.patch
Type: text/x-patch
Size: 19439 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200204/771cdcba/attachment.bin>


More information about the llvm-commits mailing list