[PATCH] D61325: Treat a narrowing PtrToInt like Trunc when generating asm

John Reagan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 8 06:47:57 PDT 2019


JohnReagan added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:2238
+    // as with Trunc just depend on the assembler to truncate it.
+    if (DL.getTypeAllocSize(Ty) <= DL.getTypeAllocSize(Op->getType()))
       return OpExpr;
----------------
We made exactly this change in our out-of-tree backend that we use for OpenVMS x86.  It was going to be one that we would push when we moved forward, but you beat me to it!  Thanks!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D61325





More information about the llvm-commits mailing list