[PATCH] D13532: [CGP] widen switch condition and case constants to target's register width

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 11:28:35 PST 2015


spatel marked 2 inline comments as done.

================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4016
@@ +4015,3 @@
+  IntegerType *NewType = Type::getIntNTy(Context, RegWidth);
+  CastInst *Zext = CastInst::CreateZExtOrBitCast(Cond, NewType);
+  Zext->insertBefore(SI);
----------------
hfinkel wrote:
> We don't need the 'OrBitCast' here, do we?
Correct - the check above guarantees that RegWidth is greater than the original type.


http://reviews.llvm.org/D13532





More information about the llvm-commits mailing list