Skip to content

Commit

Permalink
[RISCV] Run xcvbi codegen tests on -O0 and -O3
Browse files Browse the repository at this point in the history
[RISCV] regenerate corev/bi.ll assertions with update_llc_test_checks.py
  • Loading branch information
PhilippvK authored and PaoloS02 committed Sep 27, 2023
1 parent 385986f commit aea0c3a
Showing 1 changed file with 43 additions and 21 deletions.
64 changes: 43 additions & 21 deletions llvm/test/CodeGen/RISCV/corev/bi.ll
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -O0 -mtriple=riscv32 -mattr=+xcvbi -verify-machineinstrs < %s \
; RUN: | FileCheck %s
; RUN: | FileCheck %s --check-prefixes=CHECK_NOPT
; RUN: llc -O3 -mtriple=riscv32 -mattr=+xcvbi -verify-machineinstrs < %s \
; RUN: | FileCheck %s --check-prefixes=CHECK_OPT

define i32 @beqimm(i32 %a) {
; CHECK-LABEL: beqimm:
; CHECK: # %bb.0:
; CHECK-NEXT: cv.beqimm a0, 5, .LBB0_2
; CHECK-NEXT: j .LBB0_1
; CHECK-NEXT: .LBB0_1: # %f
; CHECK-NEXT: li a0, 0
; CHECK-NEXT: ret
; CHECK-NEXT: .LBB0_2: # %t
; CHECK-NEXT: li a0, 1
; CHECK-NEXT: ret
; CHECK_NOPT-LABEL: beqimm:
; CHECK_NOPT: # %bb.0:
; CHECK_NOPT-NEXT: cv.beqimm a0, 5, .LBB0_2
; CHECK_NOPT-NEXT: j .LBB0_1
; CHECK_NOPT-NEXT: .LBB0_1: # %f
; CHECK_NOPT-NEXT: li a0, 0
; CHECK_NOPT-NEXT: ret
; CHECK_NOPT-NEXT: .LBB0_2: # %t
; CHECK_NOPT-NEXT: li a0, 1
; CHECK_NOPT-NEXT: ret
;
; CHECK_OPT-LABEL: beqimm:
; CHECK_OPT: # %bb.0:
; CHECK_OPT-NEXT: cv.bneimm a0, 5, .LBB0_2
; CHECK_OPT-NEXT: # %bb.1: # %t
; CHECK_OPT-NEXT: li a0, 1
; CHECK_OPT-NEXT: ret
; CHECK_OPT-NEXT: .LBB0_2: # %f
; CHECK_OPT-NEXT: li a0, 0
; CHECK_OPT-NEXT: ret
%1 = icmp eq i32 %a, 5
br i1 %1, label %t, label %f
f:
Expand All @@ -22,16 +34,26 @@ t:
}

define i32 @bneimm(i32 %a) {
; CHECK-LABEL: bneimm:
; CHECK: # %bb.0:
; CHECK-NEXT: cv.bneimm a0, 5, .LBB1_2
; CHECK-NEXT: j .LBB1_1
; CHECK-NEXT: .LBB1_1: # %f
; CHECK-NEXT: li a0, 0
; CHECK-NEXT: ret
; CHECK-NEXT: .LBB1_2: # %t
; CHECK-NEXT: li a0, 1
; CHECK-NEXT: ret
; CHECK_NOPT-LABEL: bneimm:
; CHECK_NOPT: # %bb.0:
; CHECK_NOPT-NEXT: cv.bneimm a0, 5, .LBB1_2
; CHECK_NOPT-NEXT: j .LBB1_1
; CHECK_NOPT-NEXT: .LBB1_1: # %f
; CHECK_NOPT-NEXT: li a0, 0
; CHECK_NOPT-NEXT: ret
; CHECK_NOPT-NEXT: .LBB1_2: # %t
; CHECK_NOPT-NEXT: li a0, 1
; CHECK_NOPT-NEXT: ret
;
; CHECK_OPT-LABEL: bneimm:
; CHECK_OPT: # %bb.0:
; CHECK_OPT-NEXT: cv.beqimm a0, 5, .LBB1_2
; CHECK_OPT-NEXT: # %bb.1: # %t
; CHECK_OPT-NEXT: li a0, 1
; CHECK_OPT-NEXT: ret
; CHECK_OPT-NEXT: .LBB1_2: # %f
; CHECK_OPT-NEXT: li a0, 0
; CHECK_OPT-NEXT: ret
%1 = icmp ne i32 %a, 5
br i1 %1, label %t, label %f
f:
Expand Down

0 comments on commit aea0c3a

Please sign in to comment.