revert: arm.md (*arm_smin_cmp): New pattern.
authorMichael Collison <michael.collison@linaro.org>
Fri, 6 Nov 2015 22:38:25 +0000 (22:38 +0000)
committerMichael Collison <collison@gcc.gnu.org>
Fri, 6 Nov 2015 22:38:25 +0000 (22:38 +0000)
2015-11-06  Michael Collison  <michael.collison@linaro.org
    Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

Revert:
2015-08-01  Michael Collison  <michael.collison@linaro.org
    Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

* config/arm/arm.md (*arm_smin_cmp): New pattern.
(*arm_umin_cmp): Likewise.

2015-11-06  Michael Collison  <michael.collison@linaro.org
    Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

Revert:
2015-08-01  Michael Collison  <michael.collison@linaro.org
    Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

* gcc.target/arm/mincmp.c: New test.

From-SVN: r229895

gcc/ChangeLog
gcc/config/arm/arm.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/mincmp.c [deleted file]

index 7c19722b4923e7fa54f10d3ad926487287716fa5..b6dcee59dedece6d0862365cad3238d6015c4d5e 100644 (file)
@@ -1,3 +1,13 @@
+2015-11-06  Michael Collison  <michael.collison@linaro.org
+           Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
+
+       Revert:
+       2015-08-01  Michael Collison  <michael.collison@linaro.org
+                   Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
+
+       * config/arm/arm.md (*arm_smin_cmp): New pattern.
+       (*arm_umin_cmp): Likewise.
+
 2015-11-06  Jakub Jelinek  <jakub@redhat.com>
 
        * gimplify.c (gimplify_omp_ordered): Fix up diagnostics
index e087c1ab166e4819c2016db21ab760ab22d9d899..8ebb1bfd221e8f7f338a41b5552041f7efdb1ffd 100644 (file)
    (set_attr "type" "multiple,multiple")]
 )
 
-;; t = (s/u)min (x, y)
-;; cc = cmp (t, z)
-;; is the same as
-;; cmp x, z
-;; cmpge(u) y, z
-
-(define_insn_and_split "*arm_smin_cmp"
-  [(set (reg:CC CC_REGNUM)
-       (compare:CC
-        (smin:SI (match_operand:SI 0 "s_register_operand" "r")
-                 (match_operand:SI 1 "s_register_operand" "r"))
-        (match_operand:SI 2 "s_register_operand" "r")))]
-  "TARGET_32BIT"
-  "#"
-  "&& reload_completed"
-  [(set (reg:CC CC_REGNUM)
-       (compare:CC (match_dup 0) (match_dup 2)))
-   (cond_exec (ge:CC (reg:CC CC_REGNUM) (const_int 0))
-             (set (reg:CC CC_REGNUM)
-                  (compare:CC (match_dup 1) (match_dup 2))))]
-)
-
-(define_insn_and_split "*arm_umin_cmp"
-  [(set (reg:CC CC_REGNUM)
-       (compare:CC
-        (umin:SI (match_operand:SI 0 "s_register_operand" "r")
-                 (match_operand:SI 1 "s_register_operand" "r"))
-        (match_operand:SI 2 "s_register_operand" "r")))]
-  "TARGET_32BIT"
-  "#"
-  "&& reload_completed"
-  [(set (reg:CC CC_REGNUM)
-       (compare:CC (match_dup 0) (match_dup 2)))
-   (cond_exec (geu:CC (reg:CC CC_REGNUM) (const_int 0))
-             (set (reg:CC CC_REGNUM)
-                  (compare:CC (match_dup 1) (match_dup 2))))]
-)
-
 (define_expand "umaxsi3"
   [(parallel [
     (set (match_operand:SI 0 "s_register_operand" "")
index 774981c21a93114ca5aea1fff0d1f77cc12b836c..80221c1e301ec25f5d2fb3dc9e3dd05e8f1b1da7 100644 (file)
@@ -1,3 +1,12 @@
+2015-11-06  Michael Collison  <michael.collison@linaro.org
+           Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
+
+       Revert:
+       2015-08-01  Michael Collison  <michael.collison@linaro.org
+                   Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>
+
+       * gcc.target/arm/mincmp.c: New test.
+
 2015-11-06  Dominique d'Humieres <dominiq@lps.ens.fr>
 
        PR fortran/54224
diff --git a/gcc/testsuite/gcc.target/arm/mincmp.c b/gcc/testsuite/gcc.target/arm/mincmp.c
deleted file mode 100644 (file)
index ade3bd9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
-/* { dg-require-effective-target arm32 } */
-
-#define min(x, y) ((x) <= (y)) ? (x) : (y)
-
-unsigned int 
-foo (unsigned int i, unsigned int x, unsigned int y)
-{
-  return i < (min (x, y));
-}
-
-int 
-bar (int i, int x, int y)
-{
-  return i < (min (x, y));
-}
-
-/* { dg-final { scan-assembler "cmpcs" } } */
-/* { dg-final { scan-assembler "cmpge" } } */