[llvm-commits] Patch: Floating point optimizations for SimplifyInstruction
Michael Ilseman
milseman at apple.com
Sat Dec 8 19:23:19 PST 2012
On Dec 7, 2012, at 9:28 PM, Duncan Sands <baldrick at free.fr> wrote:
> Hi Michael,
>>> Can the pattern matching logic you added in your previous patch use
>>> isExactlyValue as a cheaper way to test for 1.0?
>>
>> isExactlyValue does exactly the code from the pattern matching code around the contained APFloat. There doesn't seem to be an easy way out of it.
>
> OK, but in that case maybe your pattern should use isExactlyValue rather than
> duplicating the code? If someone finds a better way one day then they can just
> update isExactlyValue and the pattern benefits too.
>
Definitely. I was trying to follow the pattern of is_one, which used APInt, but APFloat is just so different that I think I'll define it over the ConstantFP. That will make other float patterns easier too. Thanks!
> Ciao, Duncan.
More information about the llvm-commits
mailing list