[llvm-commits] [llvm] r140097 - in /llvm/trunk: lib/Target/X86/X86InstrSSE.td test/CodeGen/X86/avx-vinsertf128.ll

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Mon Sep 19 17:09:01 PDT 2011


You're right! :)
Will provide a better fix soon!

On Mon, Sep 19, 2011 at 4:48 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Mon, Sep 19, 2011 at 4:36 PM, Bruno Cardoso Lopes
> <bruno.cardoso at gmail.com> wrote:
>> Author: bruno
>> Date: Mon Sep 19 18:36:50 2011
>> New Revision: 140097
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=140097&view=rev
>> Log:
>> Based on the small opt Zvi's patch was trying to achieve, eliminate
>> 128-bit undef subvector insertion into a 256-bit vector
>>
>> Modified:
>>    llvm/trunk/lib/Target/X86/X86InstrSSE.td
>>    llvm/trunk/test/CodeGen/X86/avx-vinsertf128.ll
>>
>> Modified: llvm/trunk/lib/Target/X86/X86InstrSSE.td
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrSSE.td?rev=140097&r1=140096&r2=140097&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86InstrSSE.td (original)
>> +++ llvm/trunk/lib/Target/X86/X86InstrSSE.td Mon Sep 19 18:36:50 2011
>> @@ -157,6 +157,21 @@
>>  def : Pat<(insert_subvector undef, (v16i8 VR128:$src), (i32 0)),
>>           (INSERT_SUBREG (v32i8 (IMPLICIT_DEF)), VR128:$src, sub_xmm)>;
>>
>> +// Inserting a 128-bit undef vector into the high part of a 256-bit
>> +// vector should return the 256-bit vector itself.
>> +def : Pat<(insert_subvector (v8i32 VR256:$src), undef, (i32 4)),
>> +          (v8i32 VR256:$src)>;
>> +def : Pat<(insert_subvector (v8f32 VR256:$src), undef, (i32 4)),
>> +          (v8f32 VR256:$src)>;
>> +def : Pat<(insert_subvector (v4i64 VR256:$src), undef, (i32 4)),
>> +          (v4i64 VR256:$src)>;
>> +def : Pat<(insert_subvector (v4f64 VR256:$src), undef, (i32 4)),
>> +          (v4f64 VR256:$src)>;
>> +def : Pat<(insert_subvector (v16i16 VR256:$src), undef, (i32 4)),
>> +          (v16i16 VR256:$src)>;
>> +def : Pat<(insert_subvector (v32i8 VR256:$src), undef, (i32 4)),
>> +          (v32i8 VR256:$src)>;
>
> This should really be a DAGCombine...
>
> -Eli
>



-- 
Bruno Cardoso Lopes
http://www.brunocardoso.cc




More information about the llvm-commits mailing list