If extload is legal, following transform
(zext (select c, load1, load2)) -> (select c, zextload1, zextload2)
can save one ext instruction.
Differential D95086
[DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2) Carrot on Jan 20 2021, 1:14 PM. Authored by
Details If extload is legal, following transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2) can save one ext instruction.
Diff Detail Event Timeline
Comment Actions Add more test cases.
Comment Actions @Carrot I've added the new tests to trunk along with some vselect test cases - please can you rebase?
Comment Actions ANY_EXTEND of SEXTLOAD/ZEXTLOAD should not be allowed.
Comment Actions LGTM - cheers
|
We also need to ensure that the loads aren't already a extload - or are either the same type of extension (or just ISD::EXTLOAD which I guess we can replace). This will need more tests (inc negative tests).