[llvm-commits] [patch] fp128 sint_to_fp folding fix
Duncan Sands
baldrick at free.fr
Mon Jan 7 09:25:33 PST 2013
Hi Tim,
On 07/01/13 18:08, Tim Northover wrote:
> On Monday 07 Jan 2013 16:58:19 Duncan Sands wrote:
>> Hi Tim,
>>
>>> This patch fixes the constant folding of sint_to_fp when applied to fp128
>>> type. Previously the APFloat was created as a PPC128, which is obviously
>>> not appropriate here.
>>
>> sorry for being dense, but it's not obvious to me: how do you know a PPC128
>> isn't wanted here?
>
> Very good point, thanks. When I made the change, the immediately preceding
> line was "if (VT == MVT::ppcf128) break;". Obviously that's no longer there; I
> think I must have messed up a merge somewhere along the way.
OK, thanks.
>
> I'll make sure the updated patch gets this correct in both cases. Do you have
> an opinion on the default being PPC/IEEE?
I don't understand the question: there is no choice, there is no need for a
default. The type (ppc/ieee) is in the node type already, ppcf128 or f128
when talking about codegen value types, PPC_FP128Ty or FP128Ty at the IR level.
It's only the front-end (clang) that has to decide what type to output to the
IR. After that that everything is completely specified.
Ciao, Duncan.
More information about the llvm-commits
mailing list