[PATCH] D110461: Add salvageDebugInfo support for ptrtoint / inttoptr with trunc/ext behavior
Min-Yih Hsu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 27 14:46:35 PDT 2021
myhsu added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1924
+ unsigned FromTypeBitSize = FromType->getScalarSizeInBits();
unsigned ToTypeBitSize = Type->getScalarSizeInBits();
----------------
aprantl wrote:
> myhsu wrote:
> > (nit) Should we bail out if FromTypeBitSize and ToTypeBitSize are the same? Usually these two values are different for sext/zext/trunc but for inttoptr/ptrtoint it's pretty common that they have the same value.
> Interestingly, no! If the size is the same `CI->isNoopCast(DL)` will return true, even for ptrtoint/inttoptr.
Ahh i see, good catch!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110461/new/
https://reviews.llvm.org/D110461
More information about the llvm-commits
mailing list