[PATCH] [InstCombine] call SimplifyICmpInst with correct context

Jingyue Wu jingyue at google.com
Wed Jun 24 22:00:00 PDT 2015


And just to be clear, I agree with you that it's a potential issue that `ComputeSignBit` is unable to say "I don't have a context". But my concern is, even if we fix that issue, not passing the context instruction to `SimplifyICmpInst` at all in `InstCombine` may overkill some useful optimizations.

Btw, I noticed that `SimplifyDemandedBits` indeed pass `UserI` as the context instruction (http://llvm.org/docs/doxygen/html/InstCombineSimplifyDemanded_8cpp_source.html#l00075), which seems aligned with the approach in my patch.


http://reviews.llvm.org/D10695

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






More information about the llvm-commits mailing list