Message ID | 0C7AC5B0-BC08-48EF-BD7C-E2BD060FA3D9@dell.com |
---|---|
State | New |
Headers | show |
On 11/18/2010 06:01 PM, Paul Koning wrote:
> The -mabshi switch turns on/off the builtin abs pattern, which is redundant with -builtin-abs...
Well, no, it isn't. The abs pattern will be automatically generated
from something like (a < 0 ? -a : a).
That said, the pattern that you provide is pretty much exactly what
the compiler would generate itself; it doesn't seem worthwhile to
provide it at all.
r~
On Nov 19, 2010, at 12:40 PM, Richard Henderson wrote: > On 11/18/2010 06:01 PM, Paul Koning wrote: >> The -mabshi switch turns on/off the builtin abs pattern, which is redundant with -builtin-abs... > > Well, no, it isn't. The abs pattern will be automatically generated > from something like (a < 0 ? -a : a). > > That said, the pattern that you provide is pretty much exactly what > the compiler would generate itself; it doesn't seem worthwhile to > provide it at all. Thanks. I've been eliminating some patterns that didn't seem to add value; I'll add abshi to the list. paul
Index: config/pdp11/pdp11.md =================================================================== --- config/pdp11/pdp11.md (revision 166927) +++ config/pdp11/pdp11.md (working copy) @@ -1068,7 +1068,7 @@ (define_insn "abshi2" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,o") (abs:HI (match_operand:HI 1 "general_operand" "0,0")))] - "TARGET_ABSHI_BUILTIN" + "" "* { static int count = 0; Index: config/pdp11/pdp11.c =================================================================== --- config/pdp11/pdp11.c (revision 166927) +++ config/pdp11/pdp11.c (working copy) @@ -187,7 +187,7 @@ #undef TARGET_DEFAULT_TARGET_FLAGS #define TARGET_DEFAULT_TARGET_FLAGS \ - (MASK_FPU | MASK_45 | MASK_ABSHI_BUILTIN | TARGET_UNIX_ASM_DEFAULT) + (MASK_FPU | MASK_45 | TARGET_UNIX_ASM_DEFAULT) #undef TARGET_HANDLE_OPTION #define TARGET_HANDLE_OPTION pdp11_handle_option #undef TARGET_OPTION_OPTIMIZATION_TABLE Index: config/pdp11/pdp11.opt =================================================================== --- config/pdp11/pdp11.opt (revision 166927) +++ config/pdp11/pdp11.opt (working copy) @@ -30,10 +30,6 @@ Target Report Mask(45) Generate code for an 11/45 -mabshi -Target Report Mask(ABSHI_BUILTIN) -Use 16-bit abs patterns - mac0 Target Report Mask(AC0) Return floating-point results in ac0 (fr0 in Unix assembler syntax)