Instead of hoisting the C<<32, keep in place so DAGCombiner can
match the pattern to an addw.
Details
Details
- Reviewers
reames asb frasercrmck luismarques ributzka
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp | ||
---|---|---|
42 | Is this DAGCombine RISCV specific or a generic combine? |
llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp | ||
---|---|---|
42 | It's RISC-V specific. See https://reviews.llvm.org/D128869 |
Comment Actions
Explicitly check the opcode of Inst in isShiftedADDWOrSUBW. This can get called with Opcode
being Instruction::Add, but the instruction being a GEP.
Comment Actions
Make sure all 3 instructions are in the same BB to be sure the pattern can be matched.
Comment Actions
Abandoning in favor a pre-consthoist peephole in RISCVCodeGenPrepare. The single basic block restriction is too restrictive. We need to help SelectionDAG out here.
clang-format not found in user’s local PATH; not linting file.