diff mbox series

[arm] make arm_carry_operation and arm_borrow_operation duals

Message ID 19680a87-b219-6773-4c40-a47a693c6f7a@arm.com
State New
Headers show
Series [arm] make arm_carry_operation and arm_borrow_operation duals | expand

Commit Message

Richard Earnshaw (lists) Oct. 22, 2019, 1:20 p.m. UTC
Arm_carry_operation and arm_borrow_operation are duals: given that we 
have a comparison that returns a result that relies solely in the carry 
flag one is the inverse of the other.  So there's no reason for
one to have a CC mode that the other does not have.  This patch restores 
that equivalence.

	* config/arm/predicates.md (arm_borrow_operation): Handle CC_ADCmode.


Committed.
diff mbox series

Patch

diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md
index 8a8f10ccb50..267c446c03e 100644
--- a/gcc/config/arm/predicates.md
+++ b/gcc/config/arm/predicates.md
@@ -398,7 +398,7 @@  (define_special_predicate "arm_borrow_operation"
     machine_mode ccmode = GET_MODE (op0);
     if (ccmode == CC_Cmode)
       return GET_CODE (op) == GEU;
-    else if (ccmode == CCmode || ccmode == CC_RSBmode)
+    else if (ccmode == CCmode || ccmode == CC_RSBmode || ccmode == CC_ADCmode)
       return GET_CODE (op) == LTU;
     return false;
   }