Please review: X86 sext pattern optimization

Demikhovsky, Elena elena.demikhovsky at intel.com
Tue Feb 19 23:35:04 PST 2013


Please review. I'd like to commit this code.
Thanks.

- Elena
-----Original Message-----
From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Demikhovsky, Elena
Sent: Monday, February 18, 2013 14:11
To: Nadav Rotem
Cc: llvm-commits at cs.uiuc.edu
Subject: RE: Please review: X86 sext pattern optimization

> Why is this a DAGCombine optimization and not a Lowering one ?   
Too late. "Anyext" is translated before the lowering stage. I need the sequence (sext_in_reg (v4i64 anyext (v4i32 x )) as is.

Added cost.

- Elena

-----Original Message-----
From: Nadav Rotem [mailto:nrotem at apple.com]
Sent: Monday, February 18, 2013 02:03
To: Demikhovsky, Elena
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: Please review: X86 sext pattern optimization

Hi Elena, 

Thank you for working on this.  Why is this a DAGCombine optimization and not a Lowering one ?   Also, you need to update the cost model of the SEXT operations. Please add tests to the cost model to make sure that we estimate the costs of these casts correctly. 

Thanks,
Nadav


On Feb 17, 2013, at 1:20 AM, "Demikhovsky, Elena" <elena.demikhovsky at intel.com> wrote:

> 
> I optimized the following patterns:
> sext <4 x i1> to <4 x i64>
> sext <4 x i8> to <4 x i64>
> sext <4 x i16> to <4 x i64>
> 
> I'm running Combine on SIGN_EXTEND_IN_REG and revert SEXT patterns:
> (sext_in_reg (v4i64 anyext (v4i32 x )), ExtraVT) -> (v4i64 sext (v4i32 
> sext_in_reg (v4i32 x , ExtraVT)))
> 
> The sext_in_reg (v4i32 x) may be lowered to shl+sar operations.
> 
> The "sar" does not exist on 64-bit operation, so lowering sext_in_reg (v4i64 x) has no vector solution.
> 
> 
> - Elena
> 
> 
> ---------------------------------------------------------------------
> Intel Israel (74) Limited
> 
> This e-mail and any attachments may contain confidential material for 
> the sole use of the intended recipient(s). Any review or distribution 
> by others is strictly prohibited. If you are not the intended 
> recipient, please contact the sender and delete all copies.
> <sext_to_v4i64.diff>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sext_to_v4i64_cost.diff
Type: application/octet-stream
Size: 5136 bytes
Desc: sext_to_v4i64_cost.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130220/4f8d2718/attachment.obj>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130220/4f8d2718/attachment.txt>


More information about the llvm-commits mailing list