Commit aa6c7c3a by Roger Sayle Committed by Roger Sayle

builtins.c (expand_builtin): Fall back to library function call for conj...


	* builtins.c (expand_builtin): Fall back to library function call for
	conj, conjf, conjl, creal, crealf, creall, cimag, cimagf and cimagl.
	(fold_builtin_1): Lower built-ins BUILT_IN_CONJ{,F,L} to CONJ_EXPR,
	BUILT_IN_CREAL{,F,L} to REALPART_EXPR, and BUILT_IN_CIMAG{,F,L} to
	IMAGPART_EXPR respectively.

From-SVN: r82938
parent 5a57f1b2
2004-06-10 Roger Sayle <roger@eyesopen.com>
* builtins.c (expand_builtin): Fall back to library function call for
conj, conjf, conjl, creal, crealf, creall, cimag, cimagf and cimagl.
(fold_builtin_1): Lower built-ins BUILT_IN_CONJ{,F,L} to CONJ_EXPR,
BUILT_IN_CREAL{,F,L} to REALPART_EXPR, and BUILT_IN_CIMAG{,F,L} to
IMAGPART_EXPR respectively.
2004-06-10 J"orn Rennecke <joern.rennecke@superh.com>
* sh.c (dump_table): New argument start. Changed caller.
......
......@@ -5656,19 +5656,6 @@ expand_builtin (tree exp, rtx target, rtx subtarget, enum machine_mode mode,
}
break;
case BUILT_IN_CONJ:
case BUILT_IN_CONJF:
case BUILT_IN_CONJL:
case BUILT_IN_CREAL:
case BUILT_IN_CREALF:
case BUILT_IN_CREALL:
case BUILT_IN_CIMAG:
case BUILT_IN_CIMAGF:
case BUILT_IN_CIMAGL:
/* expand_tree_builtin changes these into CONJ_EXPR, REALPART_EXPR
and IMAGPART_EXPR. */
abort ();
case BUILT_IN_EXP:
case BUILT_IN_EXPF:
case BUILT_IN_EXPL:
......@@ -7670,6 +7657,29 @@ fold_builtin_1 (tree exp)
case BUILT_IN_IMAXABS:
return fold_builtin_abs (arglist, type);
case BUILT_IN_CONJ:
case BUILT_IN_CONJF:
case BUILT_IN_CONJL:
if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE))
return fold (build1 (CONJ_EXPR, type, TREE_VALUE (arglist)));
break;
case BUILT_IN_CREAL:
case BUILT_IN_CREALF:
case BUILT_IN_CREALL:
if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE))
return non_lvalue (fold (build1 (REALPART_EXPR, type,
TREE_VALUE (arglist))));
break;
case BUILT_IN_CIMAG:
case BUILT_IN_CIMAGF:
case BUILT_IN_CIMAGL:
if (validate_arglist (arglist, COMPLEX_TYPE, VOID_TYPE))
return non_lvalue (fold (build1 (IMAGPART_EXPR, type,
TREE_VALUE (arglist))));
break;
case BUILT_IN_CABS:
case BUILT_IN_CABSF:
case BUILT_IN_CABSL:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment