This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add codegen test for RV64 ALU operations
AbandonedPublic

Authored by lewis-revill on Oct 3 2018, 9:07 AM.

Details

Reviewers
asb
Summary

This patch simply adds a 64 bit duplicate of the RISC-V test for codegen of ALU instructions.

The motivation for adding this is that when more work is done on codegen, the ALU instructions are not broken.

Diff Detail

Repository
rL LLVM

Event Timeline

lewis-revill created this revision.Oct 3 2018, 9:07 AM

rv64i has a few specific *w instructions that we probably want to test them too. For instance,

define signext i32 @addiw(i32 signext %a) {
; RV64I-LABEL: addiw:
; RV64I:       # %bb.0:
; RV64I-NEXT:    addiw a0, a0, 123
; RV64I-NEXT:    ret
  %1 = add i32 %a, 123
  ret i32 %1
}

Not sure if we want to make this file i64 only and use another one (e.g. alu64-i32.ll) for the *w instructions.

Yes I could look into that. I think there is currently problems with selecting SIGN_EXTEND_INREG for rv64 (I may be misremembering), so it would be good to investigate that at the same time.

Now that I've read the RFC on the mailing lists I think it is best to keep this patch as it is, because selecting the *w instructions would require adding tablegen patterns. I think on my end it would be better to be an extra pair of eyes on the patches from Alex and others.

Sorry I missed the RFC. After having read it I agree with you. Sorry for the noise.

lewis-revill abandoned this revision.Oct 25 2018, 8:14 AM

Closing this as it was obsolete a while ago once Alex's patches started.