[PATCH] D28421: LowerTypeTests: Represent the memory region size with the constant size-1.

Evgeniy Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 10 17:21:20 PST 2017


eugenis added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/LowerTypeTests.cpp:686
                                        : TypeTestResolution::AllOnes;
-      TIL.SizeBitWidth = (BSI.BitSize <= 256) ? 8 : 32;
-      TIL.Size = ConstantInt::get((BSI.BitSize <= 256) ? Int8Ty : Int32Ty,
-                                  BSI.BitSize);
+      TIL.SizeM1BitWidth = (BSI.BitSize <= 128) ? 7 : 32;
+      TIL.SizeM1 = ConstantInt::get((BSI.BitSize <= 128) ? Int8Ty : Int32Ty,
----------------
I don;t get it. Why do we switch to a 32-bit check when BitSize == 129?



https://reviews.llvm.org/D28421





More information about the llvm-commits mailing list