[PATCH] D155908: [RISCV] Use original mask for restoring the original sign instead of from setcc

Jim Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 20:48:07 PDT 2023


Jim added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/rvv/ceil-vp.ll:46
 ; 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
 ; CHECK-NEXT:    ret
----------------
>From this change `vfsgnj.vv v8, v9, v8, v0.t` -> `vfsgnj.vv v8, v9, v8`, v0 is from vmflt.vf (compared with the largest interger). 
It should copy sign back for all active element like fabs operation (vfabs.v v9, v8) also for all active element.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155908/new/

https://reviews.llvm.org/D155908



More information about the llvm-commits mailing list