[llvm-commits] [llvm] r147426 - in /llvm/trunk: lib/Target/X86/X86ISelLowering.cpp test/CodeGen/X86/2011-12-28-vselecti8.ll test/CodeGen/X86/sext-blend.ll test/CodeGen/X86/sse2-blend.ll test/CodeGen/X86/sse41-blend.ll
Chris Lattner
clattner at apple.com
Tue Jan 3 13:51:15 PST 2012
On Jan 3, 2012, at 1:33 PM, Chris Lattner wrote:
>
> On Jan 2, 2012, at 12:05 AM, Nadav Rotem wrote:
>
>> Author: nadav
>> Date: Mon Jan 2 02:05:46 2012
>> New Revision: 147426
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=147426&view=rev
>> Log:
>>
>> Optimize the sequence blend(sign_extend(x)) to blend(shl(x)) since SSE blend instructions only look at the highest bit.
>
> Hi Nadav,
>
> This could be more implemented in InstCombiner::SimplifyDemandedVectorElts in a much more general way. Knowing that blend only demands the top bit can enable many other optimizations.
Oh, a correction. Since blend is elementwise, it should actually go in SimplifyDemandedBits. SimplifyDemandedVectorElts is for cases where only some elements are demanded (like the SS operations).
-Chris
More information about the llvm-commits
mailing list