[PATCH] [InstCombine] Fix visitSwitchInst to use right operand types for sub cstexpr.

David Majnemer david.majnemer at gmail.com
Mon Dec 15 10:04:12 PST 2014


================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:2122
@@ +2121,3 @@
+              TruncCond ? ConstantInt::get(SI.getContext(),
+                                           CaseVal->getValue().sext(BitWidth))
+                        : CaseVal);
----------------
Is there any particular reason why you chose to sext instead of zext?

http://reviews.llvm.org/D6644

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list