This is an archive of the discontinued LLVM Phabricator instance.

[RISCV][test] Add a new test of addition
ClosedPublic

Authored by benshi001 on Apr 19 2021, 8:28 AM.

Diff Detail

Event Timeline

benshi001 created this revision.Apr 19 2021, 8:28 AM
benshi001 requested review of this revision.Apr 19 2021, 8:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2021, 8:28 AM

This test will show how

; RV64I: # %bb.0:
; RV64I-NEXT: lui a1, 1
; RV64I-NEXT: addiw a1, a1, -1097
; RV64I-NEXT: addw a0, a0, a1
; RV64I-NEXT: ret

are optimized to

; RV64I: # %bb.0:
; RV64I-NEXT: addiw a0, a0, 1500
; RV64I-NEXT: addiw a0, a0, 1499
; RV64I-NEXT: ret

This revision is now accepted and ready to land.Apr 19 2021, 10:26 AM
This revision was automatically updated to reflect the committed changes.