Skip to content

Commit

Permalink
[RISCV][GISel] Add s32 G_SELECT instruction select test for RV64. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
topperc committed Nov 18, 2023
1 parent 48c5c1b commit 8ad4df8
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
# RUN: llc -mtriple=riscv64 -run-pass=instruction-select %s -o - \
# RUN: | FileCheck %s

---
name: select_s32
legalized: true
regBankSelected: true
tracksRegLiveness: true
body: |
bb.0:
liveins: $x10, $x11, $x12
; CHECK-LABEL: name: select_s32
; CHECK: liveins: $x10, $x11, $x12
; CHECK-NEXT: {{ $}}
; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr = COPY $x10
; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr = COPY $x11
; CHECK-NEXT: [[COPY2:%[0-9]+]]:gpr = COPY $x12
; CHECK-NEXT: [[Select_GPR_Using_CC_GPR:%[0-9]+]]:gpr = Select_GPR_Using_CC_GPR [[COPY]], $x0, 1, [[COPY1]], [[COPY2]]
; CHECK-NEXT: $x10 = COPY [[Select_GPR_Using_CC_GPR]]
; CHECK-NEXT: PseudoRET implicit $x10
%0:gprb(s64) = COPY $x10
%1:gprb(s64) = COPY $x11
%2:gprb(s64) = COPY $x12
%3:gprb(s32) = G_TRUNC %1
%4:gprb(s32) = G_TRUNC %2
%5:gprb(s32) = G_SELECT %0, %3, %4
%6:gprb(s64) = G_ANYEXT %5
$x10 = COPY %6(s64)
PseudoRET implicit $x10
...
---
name: select_s64
legalized: true
Expand Down

0 comments on commit 8ad4df8

Please sign in to comment.