On Tue, Oct 23, 2018 at 05:53:15PM -0400, Michael Meissner wrote: > > > +static tree > > > +rs6000_mangle_decl_assembler_name (tree decl, tree id) > > > +{ > > > + if (!TARGET_IEEEQUAD_DEFAULT && TARGET_IEEEQUAD && > > > TARGET_LONG_DOUBLE_128 > > > > Write this is in the opposite order? > > if (TARGET_LONG_DOUBLE_128 && TARGET_IEEEQUAD && !TARGET_IEEEQUAD_DEFAULT > > Because !TARGET_IEEEQUAD_DEFAULT is a constant test. If you are on a system > that defaults to IEEE 128-bit, the whole code gets deleted. I would hope the > tests still get deleted if it occurs later in the test, but I tend to put the > things that can be optimized at compile time first.
The compiler can work out what is constant by itself just fine ;-) Please try to optimise our code for readability, instead. TARGET_IEEEQUAD_DEFAULT does not make much sense unless TARGET_IEEEQUAD is set, and that itself not unless TARGET_LONG_DOUBLE is set. > > This comment is a bit misleading I think? The code checks if it is the > > same mode as would be used for long double, not if that is the actual > > asked-for type. The code is fine AFAICS, the comment isn't so great > > though. > > Well the long double type is 'TFmode'. Though _Float128 does get mapped to > TFmode instead of KFmode also. But explicit f128 built-ins won't go through > here, since they don't end in 'l'. I'm just trying to avoid things like CLZL > that take long arguments and not long double. modes and types are very different things. A mode is something on the level of your machine language, while a type is something on the level of your source language. "long double" is a type, and it can be DFmode, TFmode, IFmode, KFmode. IFmode can also be __ibm128, etc. Talking about "types" here is very confusing. Segher