OSDN Git Service

Revert r320407 "[InstCombine] Fix PR35618: Instcombine hangs on single minmax load...
authorHans Wennborg <hans@hanshq.net>
Mon, 11 Dec 2017 21:15:27 +0000 (21:15 +0000)
committerHans Wennborg <hans@hanshq.net>
Mon, 11 Dec 2017 21:15:27 +0000 (21:15 +0000)
commit9cd24fe3f81c122284d939a739d4e860f81755b6
tree4fd522b3bfebaf27e56d03e9f6b4934dbc6b106e
parent5eef35ae2d128d1a16ffc6bfefd8557df511fd3d
Revert r320407 "[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast."

The tests fail (opt asserts) on Windows.

> Summary:
> 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.
>
> Reviewers: RKSimon, spatel, majnemer
>
> Subscribers: llvm-commits
>
> Differential Revision: https://reviews.llvm.org/D41072

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320421 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
test/Transforms/InstCombine/multiple-uses-load-bitcast-select.ll [deleted file]