[llvm] [RISCV] Mark VFIRST and VCPOP as SignExtendingOpW (PR #77022)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 4 16:49:52 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
----------------
topperc wrote:
I'm confused. The ADD and ADDIW were separate users of the VFIRST. The ADDIW had no users other than a COPY . A COPY should be assumed to use all bits. So how was it allowed to be removed?
https://github.com/llvm/llvm-project/pull/77022
More information about the llvm-commits
mailing list