[PATCH] D52978: [TargetLowering][RISCV] Introduce isSExtCheaperThanZExt hook and implement for RISC-V

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 8 12:27:30 PDT 2018


efriedma added a comment.

Makes sense.



================
Comment at: lib/CodeGen/SelectionDAG/LegalizeTypes.h:284
 
+  SDValue SExtOrZExtPromotedInteger(SDValue Op) {
+    EVT OldVT = Op.getValueType();
----------------
This probably needs a doc-comment explaining that for a given subtarget and type, the choice of either sign-extension or zero-extension is consistent.


https://reviews.llvm.org/D52978





More information about the llvm-commits mailing list