]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
xtensa: Add RTX costs for if_then_else
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Fri, 29 Jul 2022 19:31:44 +0000 (04:31 +0900)
committerMax Filippov <jcmvbkbc@gmail.com>
Sat, 30 Jul 2022 04:14:18 +0000 (21:14 -0700)
It takes one machine instruction for both condtional branch and move.

gcc/ChangeLog:

* config/xtensa/xtensa.cc (xtensa_rtx_costs):
Add new case for IF_THEN_ELSE.

gcc/config/xtensa/xtensa.cc

index a851a7ae6b3cb5e08242346bb558710c8c3ea6fc..6ac879c38fb077593bd495f09f83d4f4582e5282 100644 (file)
@@ -4273,6 +4273,7 @@ xtensa_rtx_costs (rtx x, machine_mode mode, int outer_code,
 
     case ZERO_EXTRACT:
     case ZERO_EXTEND:
+    case IF_THEN_ELSE:
       *total = COSTS_N_INSNS (1);
       return true;