Page MenuHomePhabricator
Feed Advanced Search

Sat, May 27

dtcxzyw added a comment to D150862: [RISCV][CodeGenPrepare] Select the optimal base offset for GEPs with large offset.

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, 1

If 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?

Sat, May 27, 11:38 PM · Restricted Project, Restricted Project
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.
Sat, May 27, 11:24 PM · Restricted Project, Restricted Project

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

Thu, May 18, 8:31 PM · Restricted Project, Restricted Project
dtcxzyw requested review of D150862: [RISCV][CodeGenPrepare] Select the optimal base offset for GEPs with large offset.
Thu, May 18, 4:42 AM · Restricted Project, Restricted Project

Wed, May 17

dtcxzyw added a comment to D150665: [RISCV] Handle addimm chains in SelectAddrRegImm.

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()

Wed, May 17, 11:41 PM · Restricted Project, Restricted Project
dtcxzyw added a comment to D150665: [RISCV] Handle addimm chains in SelectAddrRegImm.

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.

Wed, May 17, 10:30 PM · Restricted Project, Restricted Project
dtcxzyw updated the diff for D150665: [RISCV] Handle addimm chains in SelectAddrRegImm.

Rebase and address comments.

Wed, May 17, 10:11 PM · Restricted Project, Restricted Project
dtcxzyw updated the diff for D150665: [RISCV] Handle addimm chains in SelectAddrRegImm.
  • Rebase
  • Find the best (base, offset) pair to emit compressed load/store instructions with C/Zca/Zcf/Zcd.
  • Add additional tests with large offsets
Wed, May 17, 7:09 AM · Restricted Project, Restricted Project

Tue, May 16

dtcxzyw requested review of D150665: [RISCV] Handle addimm chains in SelectAddrRegImm.
Tue, May 16, 6:03 AM · Restricted Project, Restricted Project

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
Fri, May 12, 12:08 AM · Restricted Project, Restricted Project
dtcxzyw closed D150286: [RISCV] Fold (select setcc, setcc, setcc) into and/or instructions.
Fri, May 12, 12:08 AM · Restricted Project, Restricted Project

Thu, May 11

dtcxzyw added inline comments to D150286: [RISCV] Fold (select setcc, setcc, setcc) into and/or instructions.
Thu, May 11, 1:35 AM · Restricted Project, Restricted Project
dtcxzyw updated the diff for D150286: [RISCV] Fold (select setcc, setcc, setcc) into and/or instructions.

fix comment and rebase

Thu, May 11, 1:32 AM · Restricted Project, Restricted Project

Wed, May 10

dtcxzyw added inline comments to D150177: [RISCV] Enable signed truncation check transforms for i8.
Wed, May 10, 11:36 AM · Restricted Project, Restricted Project
dtcxzyw requested review of D150286: [RISCV] Fold (select setcc, setcc, setcc) into and/or instructions.
Wed, May 10, 11:32 AM · Restricted Project, Restricted Project
dtcxzyw committed rGe5532fb4935b: [RISCV] Enable signed truncation check transforms for i8 (authored by dtcxzyw).
[RISCV] Enable signed truncation check transforms for i8
Wed, May 10, 7:55 AM · Restricted Project, Restricted Project
dtcxzyw closed D150177: [RISCV] Enable signed truncation check transforms for i8.
Wed, May 10, 7:54 AM · Restricted Project, Restricted Project
dtcxzyw added inline comments to D150177: [RISCV] Enable signed truncation check transforms for i8.
Wed, May 10, 7:20 AM · Restricted Project, Restricted Project

Tue, May 9

dtcxzyw requested review of D150177: [RISCV] Enable signed truncation check transforms for i8.
Tue, May 9, 12:15 AM · Restricted Project, Restricted Project

Mon, May 8

dtcxzyw abandoned D149814: [RISCV] Optimize i32 range checks.
Mon, May 8, 9:50 PM · Restricted Project, Restricted Project

Sat, May 6

dtcxzyw added inline comments to D149977: [RISCV] Implement shouldTransformSignedTruncationCheck..
Sat, May 6, 2:06 AM · Restricted Project, Restricted Project

Wed, May 3

dtcxzyw requested review of D149814: [RISCV] Optimize i32 range checks.
Wed, May 3, 10:10 PM · Restricted Project, Restricted Project

May 1 2023

dtcxzyw committed rG6d667d4b261e: [InstCombine] Combine const GEP chains (authored by dtcxzyw).
[InstCombine] Combine const GEP chains
May 1 2023, 9:29 AM · Restricted Project, Restricted Project
dtcxzyw added a reverting change for rGae739aefd747: Generate much more efficient code in programs like pifft: rG6d667d4b261e: [InstCombine] Combine const GEP chains.
May 1 2023, 9:29 AM
dtcxzyw closed D149240: [InstCombine] Combine const GEP chains.
May 1 2023, 9:29 AM · Restricted Project, Restricted Project
dtcxzyw updated the diff for D149240: [InstCombine] Combine const GEP chains.

Resolve conflicts before committing

May 1 2023, 8:57 AM · Restricted Project, Restricted Project

Apr 27 2023

dtcxzyw updated the diff for D149240: [InstCombine] Combine const GEP chains.

Update tests

Apr 27 2023, 10:04 AM · Restricted Project, Restricted Project

Apr 26 2023

dtcxzyw added inline comments to D149240: [InstCombine] Combine const GEP chains.
Apr 26 2023, 11:34 PM · Restricted Project, Restricted Project
dtcxzyw updated the diff for D149240: [InstCombine] Combine const GEP chains.

Update tests

Apr 26 2023, 11:32 PM · Restricted Project, Restricted Project
dtcxzyw updated the diff for D149240: [InstCombine] Combine const GEP chains.

Update tests

Apr 26 2023, 9:54 AM · Restricted Project, Restricted Project
dtcxzyw added a reverting change for rGae739aefd747: Generate much more efficient code in programs like pifft: D149240: [InstCombine] Combine const GEP chains.
Apr 26 2023, 12:07 AM
dtcxzyw requested review of D149240: [InstCombine] Combine const GEP chains.
Apr 26 2023, 12:07 AM · Restricted Project, Restricted Project

Apr 8 2023

dtcxzyw added a comment to D147789: [CodeGenPrepare][RISCV] Reverse transform in CGP to use zero-compare branch.

Can you base this on nowrap flags instead of re-deriving them?

Apr 8 2023, 12:11 AM · Restricted Project, Restricted Project

Apr 7 2023

dtcxzyw requested review of D147789: [CodeGenPrepare][RISCV] Reverse transform in CGP to use zero-compare branch.
Apr 7 2023, 7:16 AM · Restricted Project, Restricted Project

Apr 1 2023

dtcxzyw abandoned D146362: [SelectionDAG][RISCV] Fix SimplifyDemandedBits for scalable vectors.
Apr 1 2023, 10:17 PM · Restricted Project, Restricted Project
dtcxzyw updated the summary of D146362: [SelectionDAG][RISCV] Fix SimplifyDemandedBits for scalable vectors.
Apr 1 2023, 8:19 PM · Restricted Project, Restricted Project
dtcxzyw updated the diff for D146364: [Driver] Use the output filename as the base name in getStatsFileName when -save-stats=obj.

Add tests

Apr 1 2023, 7:53 PM · Restricted Project, Restricted Project

Mar 19 2023

dtcxzyw removed reviewers for D146362: [SelectionDAG][RISCV] Fix SimplifyDemandedBits for scalable vectors: liaolucy, StephenFan.
Mar 19 2023, 10:03 PM · Restricted Project, Restricted Project
dtcxzyw removed reviewers for D146364: [Driver] Use the output filename as the base name in getStatsFileName when -save-stats=obj: liaolucy, StephenFan, MaskRay.
Mar 19 2023, 10:02 PM · Restricted Project, Restricted Project
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 19 2023, 6:39 AM · Restricted Project, Restricted Project

Mar 18 2023

dtcxzyw requested review of D146364: [Driver] Use the output filename as the base name in getStatsFileName when -save-stats=obj.
Mar 18 2023, 11:32 AM · Restricted Project, Restricted Project
dtcxzyw requested review of D146362: [SelectionDAG][RISCV] Fix SimplifyDemandedBits for scalable vectors.
Mar 18 2023, 10:35 AM · Restricted Project, Restricted Project

Mar 10 2023

Herald added a project to D116680: [4/4][llvm-objdump][RISCV] Support --symbolize-operands for RISC-V: Restricted Project.
Mar 10 2023, 4:07 AM · Restricted Project, Restricted Project