[PATCH] D46414: [GlobalISel][Legalizer] More concise and faster widenScalar, NFC

Aditya Nandakumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 8 14:16:00 PDT 2018


aditya_nandakumar added a comment.

@rtereshin . Looks good and much cleaner. Thanks for working on this.



================
Comment at: lib/CodeGen/GlobalISel/LegalizerHelper.cpp:730
+    LLVMContext &Ctx = MIRBuilder.getMF().getFunction().getContext();
+    const APInt &Val = SrcMO.getCImm()->getValue().sext(WideTy.getSizeInBits());
+    SrcMO.setCImm(ConstantInt::get(Ctx, Val));
----------------
This bit looks like it's not NFC (but seems more correct). If it's indeed not NFC, then please push this in a separate commit.


Repository:
  rL LLVM

https://reviews.llvm.org/D46414





More information about the llvm-commits mailing list