Page MenuHomePhabricator

benshi001 (Ben Shi)
User

Projects

User does not belong to any projects.

User Details

User Since
Jun 6 2020, 5:03 AM (103 w, 6 h)

Recent Activity

Thu, May 26

benshi001 updated the diff for D126192: [Driver] Support linking with lld for target AVR.
Thu, May 26, 11:05 PM · Restricted Project, Restricted Project
benshi001 committed rG121689a62e5b: [SelectionDAG][NFC] Simplify integer promotion in setcc/vp.setcc (authored by Pretty-box).
[SelectionDAG][NFC] Simplify integer promotion in setcc/vp.setcc
Thu, May 26, 10:51 PM · Restricted Project, Restricted Project
benshi001 closed D126516: [RISCV][NFC] Simplified code for integer promotion setcc/vp.setcc.
Thu, May 26, 10:50 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D126192: [Driver] Support linking with lld for target AVR.
Thu, May 26, 9:54 PM · Restricted Project, Restricted Project
benshi001 updated the diff for D126192: [Driver] Support linking with lld for target AVR.
Thu, May 26, 9:43 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D126192: [Driver] Support linking with lld for target AVR.
Thu, May 26, 9:40 PM · Restricted Project, Restricted Project
benshi001 updated the diff for D126192: [Driver] Support linking with lld for target AVR.
Thu, May 26, 9:36 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D126192: [Driver] Support linking with lld for target AVR.
Thu, May 26, 9:33 PM · Restricted Project, Restricted Project
benshi001 updated the diff for D126192: [Driver] Support linking with lld for target AVR.
Thu, May 26, 9:29 PM · Restricted Project, Restricted Project

Wed, May 25

benshi001 committed rG085acede578f: [RISCV][NFC] Remove solved TODO for combining constant shifts (authored by Luhaocong).
[RISCV][NFC] Remove solved TODO for combining constant shifts
Wed, May 25, 6:56 PM · Restricted Project, Restricted Project
benshi001 closed D126185: [RISCV]Remove solved TODO for combining constant shifts.
Wed, May 25, 6:55 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D125866: [RISCV] Add test for experimental.vector.reverse.
Wed, May 25, 6:49 PM · Restricted Project, Restricted Project

Tue, May 24

benshi001 abandoned D118095: [clang][AVR] Reject non assembly source files for the avr1 family.
Tue, May 24, 11:08 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D126282: [Driver] Add more options for target AVR when linking with lld.
Tue, May 24, 5:49 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D126192: [Driver] Support linking with lld for target AVR.
Tue, May 24, 5:47 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D126299: [Driver] Support linking to compiler-rt for target AVR.
Tue, May 24, 8:00 AM · Restricted Project, Restricted Project
benshi001 updated the diff for D126299: [Driver] Support linking to compiler-rt for target AVR.
Tue, May 24, 7:08 AM · Restricted Project, Restricted Project
benshi001 requested review of D126299: [Driver] Support linking to compiler-rt for target AVR.
Tue, May 24, 7:06 AM · Restricted Project, Restricted Project
benshi001 abandoned D123612: [Driver] Support linking to compiler-rt on AVR.
Tue, May 24, 5:41 AM · Restricted Project, Restricted Project
benshi001 added inline comments to D126282: [Driver] Add more options for target AVR when linking with lld.
Tue, May 24, 3:09 AM · Restricted Project, Restricted Project
benshi001 updated the diff for D126282: [Driver] Add more options for target AVR when linking with lld.
Tue, May 24, 3:04 AM · Restricted Project, Restricted Project
benshi001 requested review of D126282: [Driver] Add more options for target AVR when linking with lld.
Tue, May 24, 3:04 AM · Restricted Project, Restricted Project

Mon, May 23

benshi001 updated the diff for D126192: [Driver] Support linking with lld for target AVR.
Mon, May 23, 7:54 PM · Restricted Project, Restricted Project
benshi001 accepted D126185: [RISCV]Remove solved TODO for combining constant shifts.
Mon, May 23, 4:50 AM · Restricted Project, Restricted Project
benshi001 added inline comments to D126192: [Driver] Support linking with lld for target AVR.
Mon, May 23, 4:49 AM · Restricted Project, Restricted Project
benshi001 updated the diff for D126192: [Driver] Support linking with lld for target AVR.
Mon, May 23, 4:44 AM · Restricted Project, Restricted Project
benshi001 requested review of D126192: [Driver] Support linking with lld for target AVR.
Mon, May 23, 4:09 AM · Restricted Project, Restricted Project

Sat, May 21

benshi001 committed rG0e8ac3a79741: [LegalizeTypes][VP] Add integer promotion support for vp.sitofp/vp.uitofp (authored by Pretty-box).
[LegalizeTypes][VP] Add integer promotion support for vp.sitofp/vp.uitofp
Sat, May 21, 7:26 PM · Restricted Project, Restricted Project
benshi001 closed D125960: [LegalizeTypes][VP] Add integer promotion support for vp.sitofp/vp.uitofp.
Sat, May 21, 7:26 PM · Restricted Project, Restricted Project

Tue, May 17

benshi001 committed rG8527f32f0a16: [lld][ELF] Support BFD name elf32-avr (authored by benshi001).
[lld][ELF] Support BFD name elf32-avr
Tue, May 17, 5:01 PM · Restricted Project
benshi001 closed D125544: [lld][ELF] Support BFD name elf32-avr.
Tue, May 17, 5:00 PM · Restricted Project, Restricted Project

Sat, May 14

benshi001 added inline comments to D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 7:11 PM · Restricted Project, Restricted Project
benshi001 updated the diff for D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 7:10 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 6:52 PM · Restricted Project, Restricted Project
benshi001 updated the diff for D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 6:50 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 6:03 PM · Restricted Project, Restricted Project
benshi001 updated the diff for D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 5:51 PM · Restricted Project, Restricted Project
benshi001 updated the diff for D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 8:22 AM · Restricted Project, Restricted Project
benshi001 added inline comments to D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 7:34 AM · Restricted Project, Restricted Project
benshi001 added inline comments to D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 7:29 AM · Restricted Project, Restricted Project
benshi001 added inline comments to D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 7:27 AM · Restricted Project, Restricted Project
benshi001 updated the diff for D125544: [lld][ELF] Support BFD name elf32-avr.
Sat, May 14, 7:20 AM · Restricted Project, Restricted Project

Fri, May 13

benshi001 added inline comments to D125544: [lld][ELF] Support BFD name elf32-avr.
Fri, May 13, 6:47 AM · Restricted Project, Restricted Project
benshi001 added inline comments to D125544: [lld][ELF] Support BFD name elf32-avr.
Fri, May 13, 6:46 AM · Restricted Project, Restricted Project
benshi001 added inline comments to D125544: [lld][ELF] Support BFD name elf32-avr.
Fri, May 13, 6:44 AM · Restricted Project, Restricted Project
benshi001 requested review of D125544: [lld][ELF] Support BFD name elf32-avr.
Fri, May 13, 6:43 AM · Restricted Project, Restricted Project

Thu, May 12

benshi001 committed rG62cb208375ea: [RISCV][NFC] Add an RV64 RUN line to rv32zfhmin-invalid.s (authored by Pretty-box).
[RISCV][NFC] Add an RV64 RUN line to rv32zfhmin-invalid.s
Thu, May 12, 7:21 PM · Restricted Project, Restricted Project
benshi001 closed D125363: [RISCV] Add an RV64 RUN line to rv32zfhmin-invalid.s .
Thu, May 12, 7:21 PM · Restricted Project, Restricted Project

Wed, May 11

benshi001 committed rG995d38925b81: [RISCV][NFC] Simplify tests by reorganizing check prefixes (authored by Pretty-box).
[RISCV][NFC] Simplify tests by reorganizing check prefixes
Wed, May 11, 7:25 PM · Restricted Project, Restricted Project
benshi001 closed D125354: [RISCV][NFC] Reorganize check prefixes in some tests to reduce redundant lines.
Wed, May 11, 7:25 PM · Restricted Project, Restricted Project
benshi001 added a comment to D125354: [RISCV][NFC] Reorganize check prefixes in some tests to reduce redundant lines.

Would it be better to change the common CHECK to RV32 in rv32 tests, and RV64 in rv64 tests ?

Wed, May 11, 6:09 AM · Restricted Project, Restricted Project

Tue, May 10

benshi001 added a comment to D125157: [clang][Driver] Add more tests for riscv.

It is my mistake. I should add --author=Ping Deng <Ping.Deng@streamcomputing.com> when doing git commit.

Tue, May 10, 12:12 AM · Restricted Project, Restricted Project, Restricted Project

Mon, May 9

benshi001 committed rG88c336d8eff0: [clang][Driver] Add more tests for riscv (authored by benshi001).
[clang][Driver] Add more tests for riscv
Mon, May 9, 7:29 PM · Restricted Project, Restricted Project
benshi001 committed rGeccf5efeccfa: [RISCV][NFC] Add 'rv32izvfh' invalid arch test (authored by benshi001).
[RISCV][NFC] Add 'rv32izvfh' invalid arch test
Mon, May 9, 7:29 PM · Restricted Project, Restricted Project
benshi001 closed D125157: [clang][Driver] Add more tests for riscv.
Mon, May 9, 7:29 PM · Restricted Project, Restricted Project, Restricted Project
benshi001 closed D125210: [RISCV] Add 'rv32izvfh' invalid arch test.
Mon, May 9, 7:29 PM · Restricted Project, Restricted Project
benshi001 added a comment to D125157: [clang][Driver] Add more tests for riscv.

Change the title to [clang][Driver] Add more tests for riscv

Mon, May 9, 2:44 AM · Restricted Project, Restricted Project, Restricted Project
benshi001 committed rGd2c4ac979b2a: [AVR] Add PrintMethod for operand memspi (authored by benshi001).
[AVR] Add PrintMethod for operand memspi
Mon, May 9, 1:32 AM · Restricted Project, Restricted Project
benshi001 closed D124913: [AVR] Add PrintMethod for operand memspi.
Mon, May 9, 1:32 AM · Restricted Project, Restricted Project
benshi001 added a comment to D124913: [AVR] Add PrintMethod for operand memspi.

It is hard to make a test for my change, since operand memspi is used only by the STDSPQRr and STDWSPQRr pseudo instructions. Adding PrintMethod is just for debug purpose, and we should see no pseudo instruction in the final assembly file.

Mon, May 9, 1:24 AM · Restricted Project, Restricted Project

Sun, May 8

benshi001 accepted D125157: [clang][Driver] Add more tests for riscv.
Sun, May 8, 11:44 PM · Restricted Project, Restricted Project, Restricted Project
benshi001 added a reviewer for D124913: [AVR] Add PrintMethod for operand memspi: Patryk27.

@Patryk27 Could you please have a look at this change? I find this bug when debugging your https://reviews.llvm.org/D123528. The STDSPQRr & STDWSPQRr are printed with the offset vaule.

Sun, May 8, 11:40 PM · Restricted Project, Restricted Project

Sat, May 7

benshi001 added inline comments to D123612: [Driver] Support linking to compiler-rt on AVR.
Sat, May 7, 12:22 AM · Restricted Project, Restricted Project
benshi001 added inline comments to D123612: [Driver] Support linking to compiler-rt on AVR.
Sat, May 7, 12:18 AM · Restricted Project, Restricted Project
benshi001 updated the diff for D123612: [Driver] Support linking to compiler-rt on AVR.
Sat, May 7, 12:15 AM · Restricted Project, Restricted Project

Fri, May 6

benshi001 added inline comments to D123612: [Driver] Support linking to compiler-rt on AVR.
Fri, May 6, 7:28 PM · Restricted Project, Restricted Project
benshi001 committed rG3902ebdd5793: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3 (authored by benshi001).
[compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3
Fri, May 6, 6:47 AM · Restricted Project, Restricted Project, Restricted Project
benshi001 closed D125077: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3.
Fri, May 6, 6:47 AM · Restricted Project, Restricted Project, Restricted Project
benshi001 added a comment to D125077: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3.

Looks good to me. It might be possible to optimize these functions a bit more but that can happen at a later time.

Fri, May 6, 6:40 AM · Restricted Project, Restricted Project, Restricted Project
benshi001 added a comment to D125077: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3.

Corresponding tests

Fri, May 6, 5:17 AM · Restricted Project, Restricted Project, Restricted Project
benshi001 added inline comments to D125077: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3.
Fri, May 6, 5:10 AM · Restricted Project, Restricted Project, Restricted Project
benshi001 added a comment to D125077: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3.

The new implementation of __mulhi3 and __mulqi3 strictly follow libgcc's special ABI.

Fri, May 6, 5:07 AM · Restricted Project, Restricted Project, Restricted Project
benshi001 added inline comments to D125077: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3.
Fri, May 6, 5:06 AM · Restricted Project, Restricted Project, Restricted Project
benshi001 updated the diff for D125077: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3.
Fri, May 6, 5:03 AM · Restricted Project, Restricted Project, Restricted Project
benshi001 requested review of D125077: [compiler-rt][builtins] Fix wrong ABI of AVR __mulqi3 & __mulhi3.
Fri, May 6, 12:25 AM · Restricted Project, Restricted Project, Restricted Project

Thu, May 5

benshi001 committed rGe2ed3fd71e08: [AVR][NFC] Eliminate warning 'unused variable' (authored by benshi001).
[AVR][NFC] Eliminate warning 'unused variable'
Thu, May 5, 11:16 PM · Restricted Project, Restricted Project
benshi001 closed D125066: [AVR][NFC] Eliminate warning 'unused variable'.
Thu, May 5, 11:15 PM · Restricted Project, Restricted Project
benshi001 updated the diff for D125066: [AVR][NFC] Eliminate warning 'unused variable'.
Thu, May 5, 11:12 PM · Restricted Project, Restricted Project
benshi001 added a comment to D123200: [compiler-rt][builtins] Add several helper functions for AVR.

@benshi001 I have been looking through the GCC code and I think avr-gcc also has a special calling convention for many other functions, including __mulqi3 and __mulhi3.

Source:

  1. I think this is where the ABI is specified in the compiler: https://github.com/gcc-mirror/gcc/blob/releases/gcc-5.4.0/gcc/config/avr/avr.md#L1543-L1549 You can see that it multiplies R24 with R22 and stores the result in R24, and clobbers R22 in the process. But no other registers.
  2. In this code sample, avr-gcc doesn't save char c (r20) across the __mulqi3 and __mulhi3 calls, which is normally call-clobbered.

Therefore, I think we need to be a bit more careful with defining these AVR builtins and check the ABI in avr-gcc first.
Also, we can make use of this and optimize the AVR backend more (you can see that the Clang generated code is much worse than avr-gcc in the above examples).

Thu, May 5, 8:07 PM · Restricted Project, Restricted Project, Restricted Project
benshi001 added a comment to D125066: [AVR][NFC] Eliminate warning 'unused variable'.

The variable STI is only used in assert, so there will be 'used variable' warnings when doing release build.

Thu, May 5, 7:35 PM · Restricted Project, Restricted Project
benshi001 requested review of D125066: [AVR][NFC] Eliminate warning 'unused variable'.
Thu, May 5, 7:34 PM · Restricted Project, Restricted Project
benshi001 added a comment to D124600: [compiler-rt][builtins] Add helper functions for uint16/sint16/uint8/sint8 div&mod.

.

Thu, May 5, 4:30 PM · Restricted Project, Restricted Project
benshi001 committed rG70a66c08fc65: [compiler-rt][builtins] Add helper functions for uint16/sint16/uint8/sint8 div… (authored by benshi001).
[compiler-rt][builtins] Add helper functions for uint16/sint16/uint8/sint8 div…
Thu, May 5, 4:30 PM · Restricted Project, Restricted Project
benshi001 closed D124600: [compiler-rt][builtins] Add helper functions for uint16/sint16/uint8/sint8 div&mod.
Thu, May 5, 4:29 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D124600: [compiler-rt][builtins] Add helper functions for uint16/sint16/uint8/sint8 div&mod.
Thu, May 5, 4:27 PM · Restricted Project, Restricted Project
benshi001 updated the diff for D124600: [compiler-rt][builtins] Add helper functions for uint16/sint16/uint8/sint8 div&mod.
Thu, May 5, 5:07 AM · Restricted Project, Restricted Project
benshi001 added inline comments to D124600: [compiler-rt][builtins] Add helper functions for uint16/sint16/uint8/sint8 div&mod.
Thu, May 5, 5:05 AM · Restricted Project, Restricted Project
benshi001 added a comment to D124600: [compiler-rt][builtins] Add helper functions for uint16/sint16/uint8/sint8 div&mod.

The following code produces __divmodqi4, so I think it is still needed:

define i8 @divqi4(i8 %a, i8 %b) addrspace(1) {
  %result = sdiv i8 %a, %b
  ret i8 %result
}

See: https://llvm.godbolt.org/z/nTbcTfbb7

Thu, May 5, 5:04 AM · Restricted Project, Restricted Project
benshi001 updated the diff for D124600: [compiler-rt][builtins] Add helper functions for uint16/sint16/uint8/sint8 div&mod.
Thu, May 5, 5:02 AM · Restricted Project, Restricted Project

Wed, May 4

benshi001 added inline comments to D117426: [AVR] Only push and clear R1 in interrupts when necessary.
Wed, May 4, 8:24 PM · Restricted Project, Restricted Project
benshi001 committed rG6641c57aebc6: [AVR] Always expand STDSPQRr & STDWSPQRr (authored by Patryk27).
[AVR] Always expand STDSPQRr & STDWSPQRr
Wed, May 4, 8:11 PM · Restricted Project, Restricted Project
benshi001 closed D123528: [AVR] Always expand STDSPQRr & STDWSPQRr.
Wed, May 4, 8:11 PM · Restricted Project, Restricted Project
benshi001 accepted D123528: [AVR] Always expand STDSPQRr & STDWSPQRr.
Wed, May 4, 7:40 PM · Restricted Project, Restricted Project
benshi001 committed rGdc66897d4cd5: [Disassembler][AVR] Remove unused static functions (authored by benshi001).
[Disassembler][AVR] Remove unused static functions
Wed, May 4, 7:21 PM · Restricted Project, Restricted Project
benshi001 committed rGb1dcd6bafb90: [MC][AVR] Implement decoding ST/LD (authored by benshi001).
[MC][AVR] Implement decoding ST/LD
Wed, May 4, 7:08 PM · Restricted Project, Restricted Project
benshi001 committed rGcef2739d682e: [MC][AVR] Implement decoding STD/LDD (authored by benshi001).
[MC][AVR] Implement decoding STD/LDD
Wed, May 4, 7:08 PM · Restricted Project, Restricted Project
benshi001 closed D123476: [MC][AVR] Implement decoding ST/LD.
Wed, May 4, 7:08 PM · Restricted Project, Restricted Project
benshi001 closed D123442: [MC][AVR] Implement decoding STD/LDD.
Wed, May 4, 7:08 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D123442: [MC][AVR] Implement decoding STD/LDD.
Wed, May 4, 6:56 PM · Restricted Project, Restricted Project
benshi001 added inline comments to D123528: [AVR] Always expand STDSPQRr & STDWSPQRr.
Wed, May 4, 5:50 AM · Restricted Project, Restricted Project