This is an archive of the discontinued LLVM Phabricator instance.

Enable folding of (logic (cast icmp), (cast icmp)) to (cast (logic (icmp), (icmp)))
AbandonedPublic

Authored by mreisinger on Jul 17 2016, 4:24 AM.

Details

Reviewers
vtjnash
grosser
Summary

So far, instcombine has already been able to transform expressions of the form (logic (cast A), (cast B)) to a simpler form (cast (logic A, B)) where "logic" designates the bitwise operators and/or/xor. However, this simplification has been avoided in case A and B are icmp instructions in order to facilitate the optimization of (zext icmp) occurrences. We now loosen this restriction to also allow the folding of (logic (cast icmp), (cast icmp)) without hindering this (zext icmp) optimization.

Diff Detail

Event Timeline

mreisinger updated this revision to Diff 64247.Jul 17 2016, 4:24 AM
mreisinger retitled this revision from to Enable folding of (logic (cast icmp), (cast icmp)) to (cast (logic (icmp), (icmp))).
mreisinger updated this object.
mreisinger added reviewers: grosser, vtjnash.
mreisinger abandoned this revision.Jul 17 2016, 6:11 AM

I'll close this again, since I forgot to initially subscribe llvm-commits to this. Sorry for the inconvenience.