If we're going to end up expanding anyway, we should do it early
so we don't create extra operations to handle the bytes added by
promotion.
This is helfpul on RISCV where we might have to promote i16 all
the way to i64.
Paths
| Differential D95756
[RISCV][LegalizeTypes] Try to expand BSWAP before promoting if the promoted BSWAP would expand anyway. ClosedPublic Authored by craig.topper on Jan 30 2021, 10:46 PM.
Details Summary If we're going to end up expanding anyway, we should do it early This is helfpul on RISCV where we might have to promote i16 all
Diff Detail
Event TimelineHerald added subscribers: vkmr, NickHung, evandro and 25 others. · View Herald TranscriptJan 30 2021, 10:46 PM Comment Actions LGTM
This revision is now accepted and ready to land.Jan 31 2021, 2:54 AM Comment Actions Fixup comments in TargetLowering.h to mention vectors. Though I don't think vectors ever reach the code, the code does call getScalarType internally. This revision was landed with ongoing or failed builds.Jan 31 2021, 2:47 PM Closed by commit rG70289ea6f591: [RISCV][LegalizeTypes] Try to expand BSWAP before promoting if the promoted… (authored by craig.topper). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 320378 llvm/include/llvm/CodeGen/TargetLowering.h
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/test/CodeGen/RISCV/bswap-ctlz-cttz-ctpop.ll
llvm/test/CodeGen/RISCV/rv64Zbb.ll
llvm/test/CodeGen/RISCV/rv64Zbp.ll
|
IIRC we handle vector nodes as well? we handle any i16/i32/i64 scalar/vector case - so maybe say something like that?