Mercurial > hg > CbC > CbC_gcc
comparison gcc/builtins.c @ 36:855418dad1a3
gcc-4.4-20091020
author | e075725 |
---|---|
date | Tue, 22 Dec 2009 21:19:31 +0900 |
parents | 58ad6c70ea60 |
children | 3bfb6c00c1e0 |
comparison
equal
deleted
inserted
replaced
19:58ad6c70ea60 | 36:855418dad1a3 |
---|---|
8632 build_real (type, dconstroot)); | 8632 build_real (type, dconstroot)); |
8633 return build_call_expr (fndecl, 2, arg, narg1); | 8633 return build_call_expr (fndecl, 2, arg, narg1); |
8634 } | 8634 } |
8635 } | 8635 } |
8636 | 8636 |
8637 /* Optimize pow(pow(x,y),z) = pow(x,y*z). */ | 8637 /* Optimize pow(pow(x,y),z) = pow(x,y*z) iff x is nonnegative. */ |
8638 if (fcode == BUILT_IN_POW | 8638 if (fcode == BUILT_IN_POW |
8639 || fcode == BUILT_IN_POWF | 8639 || fcode == BUILT_IN_POWF |
8640 || fcode == BUILT_IN_POWL) | 8640 || fcode == BUILT_IN_POWL) |
8641 { | 8641 { |
8642 tree arg00 = CALL_EXPR_ARG (arg0, 0); | 8642 tree arg00 = CALL_EXPR_ARG (arg0, 0); |
8643 tree arg01 = CALL_EXPR_ARG (arg0, 1); | 8643 if (tree_expr_nonnegative_p (arg00)) |
8644 tree narg1 = fold_build2 (MULT_EXPR, type, arg01, arg1); | 8644 { |
8645 return build_call_expr (fndecl, 2, arg00, narg1); | 8645 tree arg01 = CALL_EXPR_ARG (arg0, 1); |
8646 tree narg1 = fold_build2 (MULT_EXPR, type, arg01, arg1); | |
8647 return build_call_expr (fndecl, 2, arg00, narg1); | |
8648 } | |
8646 } | 8649 } |
8647 } | 8650 } |
8648 | 8651 |
8649 return NULL_TREE; | 8652 return NULL_TREE; |
8650 } | 8653 } |