[llvm-dev] Implementing a proposed InstCombine optimization
Sanjay Patel via llvm-dev
llvm-dev at lists.llvm.org
Thu Apr 7 09:09:24 PDT 2016
Hi Carlos -
That sounds like a good patch.
Warning - following the link below may remove some of the educational joy
for the immediate task at hand:
...but I wouldn't worry too much, there's plenty more opportunity where
that came from. :)
Feel free to post follow-up questions here or via a patch review on
On Thu, Apr 7, 2016 at 7:17 AM, Carlos Liam via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> I'm interested in implementing an InstCombine optimization that I
> discovered and verified with Alive-NJ (with the help of the authors of
> Alive-NJ). The optimization is described in Alive-NJ format as follows:
> Name: xor->fsub
> Pre: isSignBit(C)
> %x = bitcast %A
> %y = xor %x, C
> %z = bitcast %y
> %z = fsub -0.0, %A
> Effectively the optimization targets code that casts a float to an int
> with the same width, XORs the sign bit, and casts back to float, and
> replaces it with a subtraction from -0.0.
> I am not very familiar with C++ or the LLVM codebase so I would greatly
> appreciate some help in writing a patch adding this optimization.
> Thanks in advance.
> - CL
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev