[PATCH] D30016: WholeProgramDevirt: For VCP use a 32-bit ConstantInt for the byte offset.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 13:51:02 PST 2017


tejohnson added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:934
     // Rewrite each call to a load from OffsetByte/OffsetBit.
-    Constant *ByteConst = ConstantInt::get(Int64Ty, OffsetByte);
+    Constant *ByteConst = ConstantInt::get(Int32Ty, OffsetByte);
     Constant *BitConst = ConstantInt::get(Int8Ty, 1ULL << OffsetBit);
----------------
What happens if OffsetByte is bigger than 2^32? Is that possible?


https://reviews.llvm.org/D30016





More information about the llvm-commits mailing list