[llvm] 8ad4df8 - [RISCV][GISel] Add s32 G_SELECT instruction select test for RV64. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 18 12:29:42 PST 2023
Author: Craig Topper
Date: 2023-11-18T12:29:04-08:00
New Revision: 8ad4df8327e617c7ef1a727df61e4600ef13ed85
URL: https://github.com/llvm/llvm-project/commit/8ad4df8327e617c7ef1a727df61e4600ef13ed85
DIFF: https://github.com/llvm/llvm-project/commit/8ad4df8327e617c7ef1a727df61e4600ef13ed85.diff
LOG: [RISCV][GISel] Add s32 G_SELECT instruction select test for RV64. NFC
Added:
Modified:
llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/select-rv64.mir
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/select-rv64.mir b/llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/select-rv64.mir
index 16342a83d2275f0..fc5d54ac0f5480b 100644
--- a/llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/select-rv64.mir
+++ b/llvm/test/CodeGen/RISCV/GlobalISel/instruction-select/select-rv64.mir
@@ -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
More information about the llvm-commits
mailing list