[llvm-commits] [llvm] r58351 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/logical-select.ll
Chris Lattner
clattner at apple.com
Tue Oct 28 22:10:20 PDT 2008
On Oct 28, 2008, at 8:07 PM, Dan Gohman wrote:
>
> On Oct 28, 2008, at 4:13 PM, Chris Lattner wrote:
>
>> On Oct 28, 2008, at 3:39 PM, Dan Gohman wrote:
>>> URL: http://llvm.org/viewvc/llvm-project?rev=58351&view=rev
>>> Log:
>>> (A & sext(C)) | (B & ~sext(C) -> C ? A : B
>>
>> Is sext from i1 really the canonical form or is select c, -1, 0? If
>> so, do we turn "c ? -1 : 0" into sext(c)? If not, do we already do
>> this xform for the ?: form?
>
>
> There doesn't appear to be a canonical form yet. sext i1 to i32 is
> not converted to select, and select x, -1, 0 is not converted to sext.
>
> Also, we don't do the above xform for the ?: form.
>
> Do you have a preference for which to make canonical?
I have a slight preference for select over sext. I think it would
interact best with the existing optimizers.
-Chris
More information about the llvm-commits
mailing list