If the upper 32 bits are zero and bit 31 is set, we might be able to
use zext.w to fill in the zeros after using an lui and/or addi.
Most of this patch is plumbing the subtarget features into the constant
materialization.
Paths
| Differential D105509
[RISCV] Teach constant materialization that it can use zext.w at the end with Zba to reduce number of instructions. ClosedPublic Authored by craig.topper on Jul 6 2021, 1:23 PM.
Details Summary If the upper 32 bits are zero and bit 31 is set, we might be able to Most of this patch is plumbing the subtarget features into the constant
Diff Detail
Event TimelineHerald added subscribers: StephenFan, vkmr, frasercrmck and 22 others. · View Herald TranscriptJul 6 2021, 1:23 PM Comment Actions LGTM. Thanks!
This revision is now accepted and ready to land.Jul 16 2021, 3:44 AM
Closed by commit rG4dbb78806871: [RISCV] Teach constant materialization that it can use zext.w at the end with… (authored by craig.topper). · Explain WhyJul 16 2021, 9:36 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 356811 llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.hllvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
llvm/test/CodeGen/RISCV/rv64zba.ll
llvm/test/MC/RISCV/rv64b-aliases-valid.s
|
clang-format not found in user’s local PATH; not linting file.