[PATCH] D122951: [RISCV][SelectionDAG] Add a hook to sign extend i32 ConstantInt operands of phis on RV64.

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 2 03:56:56 PDT 2022


jrtc27 added inline comments.


================
Comment at: llvm/test/CodeGen/RISCV/aext-to-sext.ll:81
+; SelectionDAGBuilder is zero extend we have a target hook to override it.
+define i64 @sext_phi_constnats(i32 %c) {
 ; RV64I-LABEL: miscompile:
----------------
Also marking %c as signext (which is what the psABI gives you) would avoid the sext.w noise


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122951



More information about the llvm-commits mailing list