[llvm] [RISCV] Use unmasked vfsgnj during fp unary op lowering (PR #81211)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 8 17:14:49 PST 2024


================
@@ -20,8 +20,7 @@ define <vscale x 1 x half> @vp_ceil_vv_nxv1f16(<vscale x 1 x half> %va, <vscale
 ; CHECK-NEXT:    vfcvt.x.f.v v9, v8, v0.t
 ; CHECK-NEXT:    fsrm a0
 ; CHECK-NEXT:    vfcvt.f.x.v v9, v9, v0.t
-; CHECK-NEXT:    vsetvli zero, zero, e16, mf4, ta, mu
-; CHECK-NEXT:    vfsgnj.vv v8, v9, v8, v0.t
+; CHECK-NEXT:    vfsgnj.vv v8, v9, v8
----------------
topperc wrote:

This puts all ones in all of the masked off lanes. That's not what we want. We need to keep the original input value for those lanes.

https://github.com/llvm/llvm-project/pull/81211


More information about the llvm-commits mailing list