[llvm] [RISCV] Mark VFIRST and VCPOP as SignExtendingOpW (PR #77022)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 4 15:09:43 PST 2024
================
@@ -28,3 +28,55 @@ body: |
$x11 = COPY %4
PseudoRET
...
+---
+ name: vfirst
+ tracksRegLiveness: true
+ body: |
+ bb.0.entry:
+ liveins: $x10, $v8
+
+ ; CHECK-LABEL: name: vfirst
+ ; CHECK: liveins: $x10, $v8
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:vr = COPY $v8
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gprnox0 = COPY $x10
+ ; CHECK-NEXT: [[PseudoVFIRST_M_B1_:%[0-9]+]]:gpr = PseudoVFIRST_M_B1 [[COPY]], [[COPY1]], 0 /* e8 */
+ ; CHECK-NEXT: [[ADD:%[0-9]+]]:gpr = ADD [[COPY1]], [[PseudoVFIRST_M_B1_]]
+ ; CHECK-NEXT: $x10 = COPY [[ADD]]
+ ; CHECK-NEXT: $x11 = COPY [[PseudoVFIRST_M_B1_]]
+ ; CHECK-NEXT: PseudoRET
+ %0:vr = COPY $v8
+ %1:gprnox0 = COPY $x10
+ %2:gpr = PseudoVFIRST_M_B1 %0:vr, %1:gprnox0, 0
+ %3:gpr = ADD %1, %2
----------------
mshockwave wrote:
IIRC we need an additional use of `%2` otherwise `ADDI` will be removed before RISCVOptWInstrs even kicks in. Let me double check.
https://github.com/llvm/llvm-project/pull/77022
More information about the llvm-commits
mailing list