[PATCH] D41072: [InstCombine] Fix PR5618: Instcombine hangs on single minmax load bitcast.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 11 09:14:37 PST 2017


ABataev created this revision.

If we have pattern `store (load(bitcast(select (cmp(V1, V2), &V1,
&V2)))), bitcast)`, but the load is used in other instructions, it leads
to looping in InstCombiner. Patch adds additional check that all users
of the load instructions are stores and then replaces all uses of load
instruction by the new one with new type.


https://reviews.llvm.org/D41072

Files:
  lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  test/Transforms/InstCombine/multiple-uses-load-bitcast-select.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41072.126384.patch
Type: text/x-patch
Size: 6186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171211/fd95a96f/attachment.bin>


More information about the llvm-commits mailing list