[LLVMdev] Extracting a splat value from vector instruction.

Demikhovsky, Elena elena.demikhovsky at intel.com
Sun Jul 12 07:07:00 PDT 2015


Thank you. I submitted the code for review.
http://reviews.llvm.org/D11124


-  Elena

-----Original Message-----
From: Hal Finkel [mailto:hfinkel at anl.gov] 
Sent: Friday, July 10, 2015 03:23
To: Demikhovsky, Elena
Cc: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] Extracting a splat value from vector instruction.

----- Original Message -----
> From: "Elena Demikhovsky" <elena.demikhovsky at intel.com>
> To: llvmdev at cs.uiuc.edu
> Sent: Thursday, July 9, 2015 7:10:48 AM
> Subject: [LLVMdev] Extracting a splat value from vector instruction.
> 
> 
> 
> Hi,
> 
> We have a function in IRBuilder.h
> Value *CreateVectorSplat( unsigned NumElts , Value * V , const Twine & 
> Name = "" ) { ..
> }
> 
> This function creates 2 instructions - “insertelement” and “shuffle”
> with all-zero mask.
> 
> Now I want to add
> Value *getSplatValue(Value *Val). This function will try to recognize 
> the pattern - insertelement+shuffle and return the splat value (or 
> nullptr).
> I suppose, this interface should be useful. Do you agree with me?
> 
> If yes, where should I put it? May it be I can define a new class 
> VectorInst and put this interface there?

It does sound useful, but I think you might as well put it in include/llvm/Analysis/VectorUtils.h as a static helper function. I don't think we need a new artificial subclass just for this functionality.

 -Hal

> Thank you.
> 
> 
> 
>     * 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.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 

--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
---------------------------------------------------------------------
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.




More information about the llvm-dev mailing list