[llvm-commits] [llvm] r130005 - in /llvm/trunk: lib/CodeGen/SelectionDAG/TargetLowering.cpp lib/Target/README.txt test/CodeGen/X86/shrink-compare.ll
Chris Lattner
clattner at apple.com
Fri Apr 22 14:00:32 PDT 2011
On Apr 22, 2011, at 1:14 PM, Dan Gohman wrote:
>>
>> New Revision: 130005
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=130005&view=rev
>> Log:
>> DAGCombine: fold "(zext x) == C" into "x == (trunc C)" if the trunc is lossless.
>
> Why is this a DAGCombine instead of an InstCombine?
It could also make sense to do this in InstCombine, but also doing it in dagcombine is important due to load narrowing that dagcombine does. Think "(icmp eq (and (load i32* P), 255), 42)". We don't do load narrowing in instcombine.
-Chris
More information about the llvm-commits
mailing list