This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/71078] x/abs(x) -> sign(1.0,x)
- From: "prathamesh3492 at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 09 Aug 2016 09:01:33 +0000
- Subject: [Bug middle-end/71078] x/abs(x) -> sign(1.0,x)
- Auto-submitted: auto-generated
- References: <bug-71078-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71078
--- Comment #11 from prathamesh3492 at gcc dot gnu.org ---
(In reply to Thomas Preud'homme from comment #10)
> Hi,
>
> The following tests are still failing for me on arm-none-eabi targets:
>
> FAIL: gcc.dg/tree-ssa/pr71078-1.c scan-tree-dump forwprop1
> "__builtin_copysignf"
> FAIL: gcc.dg/tree-ssa/pr71078-1-double.c scan-tree-dump forwprop1
> "__builtin_copysign"
> FAIL: gcc.dg/tree-ssa/pr71078-2.c scan-tree-dump forwprop1
> "__builtin_copysignf"
> FAIL: gcc.dg/tree-ssa/pr71078-2-double.c scan-tree-dump forwprop1
> "__builtin_copysign"
> FAIL: gcc.dg/tree-ssa/pr71078-3.c scan-tree-dump forwprop1
> "__builtin_copysign"
>
>
> My investigation for pr71078-1.c led me to the first if block in
> gimple_fold_stmt_to_constant_1. if gimple_simplify returns true as it does
> when matching the x / abs(x) -> copysign (1.0, x) match.pd pattern. However
> gimple_simplified_result_is_gimple_val is false because copysign is a
> builtin and mprts_hook is NULL at this point.
>
> The switch that follows goes in GIMPLE_BINARY_RHS case to return NULL_TREE
> because it does not recognize an operation it knows about.
>
> I suspect the same happens for the other testcases.
Hi,
I committed r239255, which restricts the test-cases to c99_runtime
because they were failing on bare-metal arm and aarch64 targets,
The commit worked for me.
Could you please try with r239255 ?
Thanks,
Prathamesh