In D150862#4359123, @StephenFan wrote:I think we still resolved part of this problem instead of all of it. The reason is for
define void @foo(ptr %dest) { %p1 = getelementptr i8, ptr %dest, i32 2048 store i8 1, ptr %p1 %p2 = getelementptr i8, ptr %dest, i32 2049 store i8 1, ptr %p2 %p3 = getelementptr i8, ptr %dest, i32 2050 store i8 1, ptr %p3 %p4 = getelementptr i8, ptr %dest, i32 2051 store i8 1, ptr %p4 ret void }the extra addi a1, a0, 1 is produced by 2048 can not be represented in Int<12>. And this patch just resolved this kind of case. Consider that if the offset is 4194305, the addi still exists since the instruction selector selects it to
lui a1, 1024 addiw a1, a1, 1If you want to solve all of these kinds of cases, you need to repeat all the logic that selecting a large constant. So maybe handle it after instruction selection is a better way?
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Sat, May 27
Sat, May 27
dtcxzyw added a comment to D150862: [RISCV][CodeGenPrepare] Select the optimal base offset for GEPs with large offset.
dtcxzyw updated the diff for D150862: [RISCV][CodeGenPrepare] Select the optimal base offset for GEPs with large offset.
- Rebase
- Fix assertion failures due to dangling value handle references
- Add a test from @StephenFan, which tries to find an offset divisible by 4096 to use lui + add.
Thu, May 18
Thu, May 18
dtcxzyw updated the diff for D150862: [RISCV][CodeGenPrepare] Select the optimal base offset for GEPs with large offset.
+ Rebase
+ Fix assertion failures
Wed, May 17
Wed, May 17
In D150665#4351984, @craig.topper wrote:In D150665#4351914, @dtcxzyw wrote:In D150665#4350578, @craig.topper wrote:I feel like this should be handled where the chain was formed or in DAG combine. The whole reason the chain exists is to provide a common base. If the common base isn't right we should fix that.
I cannot find code about forming chains in RISCVISelLowering.cpp and RISCVISelDAGToDAG.cpp. Should I implement some virtual member functions of class TargetLowering?
I think the splitting is done by CodeGenPrepare::splitLargeGEPOffsets()
In D150665#4350578, @craig.topper wrote:I feel like this should be handled where the chain was formed or in DAG combine. The whole reason the chain exists is to provide a common base. If the common base isn't right we should fix that.
Rebase and address comments.
- Rebase
- Find the best (base, offset) pair to emit compressed load/store instructions with C/Zca/Zcf/Zcd.
- Add additional tests with large offsets
Tue, May 16
Tue, May 16
Fri, May 12
Fri, May 12
dtcxzyw committed rGaf161ffc7fdd: [RISCV] Fold (select setcc, setcc, setcc) into and/or instructions (authored by dtcxzyw).
[RISCV] Fold (select setcc, setcc, setcc) into and/or instructions
Thu, May 11
Thu, May 11
dtcxzyw added inline comments to D150286: [RISCV] Fold (select setcc, setcc, setcc) into and/or instructions.
dtcxzyw updated the diff for D150286: [RISCV] Fold (select setcc, setcc, setcc) into and/or instructions.
fix comment and rebase
Wed, May 10
Wed, May 10
dtcxzyw requested review of D150286: [RISCV] Fold (select setcc, setcc, setcc) into and/or instructions.
dtcxzyw committed rGe5532fb4935b: [RISCV] Enable signed truncation check transforms for i8 (authored by dtcxzyw).
[RISCV] Enable signed truncation check transforms for i8
Tue, May 9
Tue, May 9
Mon, May 8
Mon, May 8
Sat, May 6
Sat, May 6
Wed, May 3
Wed, May 3
May 1 2023
May 1 2023
[InstCombine] Combine const GEP chains
Resolve conflicts before committing
Apr 27 2023
Apr 27 2023
Update tests
Apr 26 2023
Apr 26 2023
Update tests
Update tests
dtcxzyw added a reverting change for rGae739aefd747: Generate much more efficient code in programs like pifft: D149240: [InstCombine] Combine const GEP chains.
Apr 8 2023
Apr 8 2023
dtcxzyw added a comment to D147789: [CodeGenPrepare][RISCV] Reverse transform in CGP to use zero-compare branch.
In D147789#4251449, @nikic wrote:Can you base this on nowrap flags instead of re-deriving them?
Apr 7 2023
Apr 7 2023
Apr 1 2023
Apr 1 2023
dtcxzyw updated the summary of D146362: [SelectionDAG][RISCV] Fix SimplifyDemandedBits for scalable vectors.
dtcxzyw updated the diff for D146364: [Driver] Use the output filename as the base name in getStatsFileName when -save-stats=obj.
Add tests
Mar 19 2023
Mar 19 2023
dtcxzyw removed reviewers for D146362: [SelectionDAG][RISCV] Fix SimplifyDemandedBits for scalable vectors: liaolucy, StephenFan.
dtcxzyw updated the diff for D146364: [Driver] Use the output filename as the base name in getStatsFileName when -save-stats=obj.
Fix test errors.
Mar 18 2023
Mar 18 2023
dtcxzyw requested review of D146362: [SelectionDAG][RISCV] Fix SimplifyDemandedBits for scalable vectors.
Mar 10 2023
Mar 10 2023
Herald added a project to D116680: [4/4][llvm-objdump][RISCV] Support --symbolize-operands for RISC-V: Restricted Project.