[AArch64][GlobalISel] Run overlapping_and after legalization
When we have code with truncates, those truncates may be changed into G_ANDs with constants. These may, in turn, feed into other G_AND instructions. Running this combine post-legalize allows us to optimize examples like this one: https://godbolt.org/z/zrGY4dfEW SDAG currently optimizes the example above so that there is only one `and`. GISel doesn't optimize it, because the G_AND we'd optimize here is translated as a G_TRUNC. Later, that G_TRUNC is turned into a G_AND during legalization. Differential Revision: https://reviews.llvm.org/D110667
Loading
Please sign in to comment