summaryrefslogtreecommitdiffhomepage
path: root/ir/lower
diff options
context:
space:
mode:
authorChristoph Mallon <christoph.mallon@gmx.de>2016-11-04 17:10:17 +0100
committerChristoph Mallon <christoph.mallon@gmx.de>2016-11-04 17:10:17 +0100
commitac7f7de3f1d430cc5284e369e97dcbe12b5f14a5 (patch)
tree886200da6b168e85f3feda8fc401793841a4b74a /ir/lower
parent9bcf83b3c7d1b844180746c6470c8f3eaf23863a (diff)
ir: Factor out 'is_Const(x) && is_Const_one(x)' into the new function 'is_irn_one()'.
Diffstat (limited to 'ir/lower')
-rw-r--r--ir/lower/lower_intrinsics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ir/lower/lower_intrinsics.c b/ir/lower/lower_intrinsics.c
index e9c36d5..02a95e9 100644
--- a/ir/lower/lower_intrinsics.c
+++ b/ir/lower/lower_intrinsics.c
@@ -242,7 +242,7 @@ int i_mapper_pow(ir_node *call)
dbg_info *dbg;
ir_node *mem;
- if (is_Const(left) && is_Const_one(left)) {
+ if (is_irn_one(left)) {
/* pow (1.0, x) = 1.0 */
irn = left;
} else if (is_Const(right)) {
@@ -347,7 +347,7 @@ static int i_mapper_one_to_zero(ir_node *call)
{
ir_node *val = get_Call_param(call, 0);
- if (is_Const(val) && is_Const_one(val)) {
+ if (is_irn_one(val)) {
/* acos(1.0) = 0.0 */
ir_graph *irg = get_irn_irg(val);
ir_mode *mode = get_irn_mode(val);