[DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1,...
authorGuozhi Wei <carrot@google.com>
Thu, 18 Feb 2021 21:12:19 +0000 (13:12 -0800)
committerGuozhi Wei <carrot@google.com>
Thu, 18 Feb 2021 21:15:20 +0000 (13:15 -0800)
commit66f2d09ebf8d81d019a5524cdc5e7f88acbb7504
tree82689a0e429620378292f22f56969bce7e95958c
parentea2ff54ccc22f86f95e989d47daa669e0af950a8
[DAGCombiner] Transform (zext (select c, load1, load2)) -> (select c, zextload1, zextload2)

If extload is legal, following transform
    (zext (select c, load1, load2)) -> (select c, zextload1, zextload2)
can save one ext instruction.

Differential Revision: https://reviews.llvm.org/D95086
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/test/CodeGen/X86/select-ext.ll