[PATCH] D140988: [SystemZ] Implement lowering of GET_ROUNDING
Tulio Magno Quites Machado Filho via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 12:40:12 PST 2023
tuliom marked 3 inline comments as done.
tuliom added inline comments.
================
Comment at: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:9085
+ DAG.getNode((VT.getSizeInBits() < 16 ? ISD::TRUNCATE : ISD::ZERO_EXTEND),
+ dl, VT, RetVal);
+
----------------
tuliom wrote:
> uweigand wrote:
> > Since we're doing the computation in `i32`, shouldn't this be a `TRUNCATE` for all sizes < 32 ? Also, if the size is exactly 32, we don't need either truncate or extend (not sure if the extend gets optimized away?).
> Oops. That's correct.
> No, it does not get optimized away.
> No, it does not get optimized away.
Let me correct myself: in a way, it does get optimized away.
But , AFAIU, the LLGFR is needed after RXSBG anyway.
You can see the generated code in the updated test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140988/new/
https://reviews.llvm.org/D140988
More information about the llvm-commits
mailing list