From 020be062488d755236f296fff760c7491e11997b Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 19 Sep 2018 09:47:30 +0200 Subject: Switch conditions for eref plattforms. Otherwise an isel is generated if no isel is needed at all. Bug 24516 --- powerpc/Asmexpand.ml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'powerpc/Asmexpand.ml') diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml index 62e65951..8c473a7f 100644 --- a/powerpc/Asmexpand.ml +++ b/powerpc/Asmexpand.ml @@ -415,12 +415,12 @@ let expand_int64_arith conflict rl fn = and with 64-bit integer registers. *) let expand_integer_cond_move a1 a2 a3 res = - if eref then begin + if a2 = a3 then + emit (Pmr (res, a2)) + else if eref then begin emit (Pcmpwi (a1,Cint (Int.zero))); emit (Pisel (res,a3,a2,CRbit_2)) - end else if a2 = a3 then - emit (Pmr (res, a2)) - else begin + end else begin (* a1 has type _Bool, hence it is 0 or 1 *) emit (Psubfic (GPR0, a1, Cint _0)); (* r0 = -1 (all ones) if a1 is true, r0 = 0 if a1 is false *) -- cgit