[PATCH] D13532: [CGP] widen switch condition and case constants to target's register width
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 14 14:15:00 PDT 2015
reames added a comment.
This looks entirely reasonable to me, but I'm not an expert in this area. The code LGTM, but I'm not sure about the implications of the change. Can someone else comment on that?
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4015
@@ +4014,3 @@
+ // where N is the number of cases in the switch.
+ IntegerType *NewType = Type::getIntNTy(Context, RegWidth);
+ CastInst *Zext = CastInst::CreateZExtOrBitCast(Cond, NewType);
----------------
auto
http://reviews.llvm.org/D13532
More information about the llvm-commits
mailing list