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.
Details
Details
- Reviewers
RKSimon spatel majnemer - Commits
- rG83c15b136337: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rG195c97e220bf: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rGca4c9a524615: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rGd0c3aeb20045: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rGfb68c48a8201: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rG1daef8a6678a: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rGec128ace8a4d: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rL320525: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rL320510: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rL320499: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rL320496: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rL320488: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rL320483: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
rL320407: [InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Yep, missed the digit
test/Transforms/InstCombine/multiple-uses-load-bitcast-select.ll | ||
---|---|---|
6 ↗ | (On Diff #126384) | I can remove it, sure |
Comment Actions
LGTM. Since the bitcast-creating canonicalization that we're trying to inhibit can affect multiple stores, we have to handle that case too.