[llvm] a5095b9 - [RISCV] Add test for incorrect FP build vector lowering. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 13:10:37 PST 2024
Author: Craig Topper
Date: 2024-03-05T13:10:14-08:00
New Revision: a5095b9892123fb41fd894a1b08fa45c6b3c7f03
URL: https://github.com/llvm/llvm-project/commit/a5095b9892123fb41fd894a1b08fa45c6b3c7f03
DIFF: https://github.com/llvm/llvm-project/commit/a5095b9892123fb41fd894a1b08fa45c6b3c7f03.diff
LOG: [RISCV] Add test for incorrect FP build vector lowering. NFC
The lowering is not distinquishing -2147483648.0 and 2147483648.0.
Added:
Modified:
llvm/test/CodeGen/RISCV/rvv/vle_vid-vfcvt.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/RISCV/rvv/vle_vid-vfcvt.ll b/llvm/test/CodeGen/RISCV/rvv/vle_vid-vfcvt.ll
index e764aa2a9acadc..5588dd5db5986d 100644
--- a/llvm/test/CodeGen/RISCV/rvv/vle_vid-vfcvt.ll
+++ b/llvm/test/CodeGen/RISCV/rvv/vle_vid-vfcvt.ll
@@ -112,3 +112,20 @@ entry:
store <4 x float> <float 1.5, float 2.5, float 3.5, float 4.5>, ptr %t, align 16
ret void
}
+
+; FIXME: This is miscompiled. This will create -2147483648.0 instead of
+; 2147483648.0 for the 4th element.
+define void @foo_9(ptr nocapture noundef writeonly %t) {
+; CHECK-LABEL: foo_9:
+; CHECK: # %bb.0: # %entry
+; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
+; CHECK-NEXT: vid.v v8
+; CHECK-NEXT: vsll.vi v8, v8, 31
+; CHECK-NEXT: vrsub.vi v8, v8, 0
+; CHECK-NEXT: vfcvt.f.x.v v8, v8
+; CHECK-NEXT: vse32.v v8, (a0)
+; CHECK-NEXT: ret
+entry:
+ store <4 x float> <float 0.0, float -2147483648.0, float 0.0, float 2147483648.0>, ptr %t, align 16
+ ret void
+}
More information about the llvm-commits
mailing list