Skip to content

Commit

Permalink
[RISCV] regenerate corev/bi.ll assertions with update_llc_test_checks.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK authored and PaoloS02 committed Sep 25, 2023
1 parent c078697 commit b8f0214
Showing 1 changed file with 41 additions and 30 deletions.
71 changes: 41 additions & 30 deletions llvm/test/CodeGen/RISCV/corev/bi.ll
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
; RUN: llc -O0 -mtriple=riscv32 -mattr=+xcvbi -verify-machineinstrs -o %T/non-optimized.s < %s
; RUN: FileCheck %s --check-prefixes=CHECK,CHECK_NOPT -input-file=%T/non-optimized.s
; RUN: llc -O3 -mtriple=riscv32 -mattr=+xcvbi -verify-machineinstrs -o %T/optimized.s < %s
; RUN: FileCheck %s --check-prefixes=CHECK,CHECK_OPT -input-file=%T/optimized.s
; 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 --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_NOPT-NEXT: cv.beqimm a0, 5, .LBB0_2
; CHECK_OPT-NEXT: cv.bneimm a0, 5, .LBB0_2
; CHECK_NOPT-NEXT: j .LBB0_1
; CHECK_NOPT-NEXT: .LBB0_1: # %f
; CHECK_OPT-NEXT: # %bb.1: # %t
; 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_OPT-NEXT: li a0, 1
; CHECK-NEXT: ret
; CHECK_NOPT-NEXT: .LBB0_2: # %t
; CHECK_OPT-NEXT: .LBB0_2: # %f
; CHECK_NOPT-NEXT: ret
; CHECK_NOPT-NEXT: .LBB0_2: # %t
; CHECK_NOPT-NEXT: li a0, 1
; CHECK_OPT-NEXT: li a0, 0
; CHECK-NEXT: ret
; 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 @@ -28,21 +34,26 @@ t:
}

define i32 @bneimm(i32 %a) {
; CHECK-LABEL: bneimm:
; CHECK: # %bb.0:
; CHECK_NOPT-NEXT: cv.bneimm a0, 5, .LBB1_2
; CHECK_OPT-NEXT: cv.beqimm a0, 5, .LBB1_2
; CHECK_NOPT-NEXT: j .LBB1_1
; CHECK_NOPT-NEXT: .LBB1_1: # %f
; 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_NOPT-NEXT: li a0, 0
; CHECK_OPT-NEXT: li a0, 1
; CHECK-NEXT: ret
; CHECK_NOPT-NEXT: .LBB1_2: # %t
; CHECK_OPT-NEXT: li a0, 1
; CHECK_OPT-NEXT: ret
; CHECK_OPT-NEXT: .LBB1_2: # %f
; CHECK_NOPT-NEXT: li a0, 1
; CHECK_OPT-NEXT: li a0, 0
; CHECK-NEXT: ret
; 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 b8f0214

Please sign in to comment.