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

Yeting Kuo via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 20 21:03:04 PDT 2023


fakepaper56 added a comment.

In D155908#4521179 <https://reviews.llvm.org/D155908#4521179>, @Jim wrote:

> During lowering rounding operation, it is converted to the absolute value with the mask that is from vp (or all ones mask for unmasked),
> and compare with the largest integer that can be represented exactly. This comparision generates new mask that is used to only convert
> the value less than the largest integer. The end, we copy the sign back to the value that should use the old mask the same with fabs operation.

I think those elements inactive for `SetccMask` are not changed during the truncation and we don't care them.


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