ChangeLog:
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Feb 2005 21:11:06 +0000 (21:11 +0000)
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Feb 2005 21:11:06 +0000 (21:11 +0000)
PR target/20054
* config/s390/s390.md ("*llgt_sidi", "*llgt_sidi_split"): Move to
before the "*llgt_didi" pattern.

testsuite/ChangeLog:

PR target/20054
* gcc.dg/pr20054.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95233 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/s390/s390.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr20054.c [new file with mode: 0644]

index f448cc1..8271af2 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-18  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       PR target/20054
+       * config/s390/s390.md ("*llgt_sidi", "*llgt_sidi_split"): Move to
+       before the "*llgt_didi" pattern.
+
 2005-02-18  Jason Merrill  <jason@redhat.com>
 
        * gimplify.c (gimplify_modify_expr_rhs) [CALL_EXPR]: Revert again.
index 752d294..a0b9a31 100644 (file)
 ; LLGT-type instructions (zero-extend from 31 bit to 64 bit).
 ;
 
+(define_insn "*llgt_sidi"
+  [(set (match_operand:DI 0 "register_operand" "=d")
+        (and:DI (subreg:DI (match_operand:SI 1 "memory_operand" "m") 0)
+               (const_int 2147483647)))]
+  "TARGET_64BIT"
+  "llgt\t%0,%1"
+  [(set_attr "op_type"  "RXE")])
+
+(define_insn_and_split "*llgt_sidi_split"
+  [(set (match_operand:DI 0 "register_operand" "=d")
+        (and:DI (subreg:DI (match_operand:SI 1 "memory_operand" "m") 0)
+               (const_int 2147483647)))
+   (clobber (reg:CC 33))]
+  "TARGET_64BIT"
+  "#"
+  "&& reload_completed"
+  [(set (match_dup 0)
+        (and:DI (subreg:DI (match_dup 1) 0)
+               (const_int 2147483647)))]
+  "")
+
 (define_insn "*llgt_sisi"
   [(set (match_operand:SI 0 "register_operand" "=d,d")
         (and:SI (match_operand:SI 1 "nonimmediate_operand" "d,m")
                 (const_int 2147483647)))]
   "")
 
-(define_insn "*llgt_sidi"
-  [(set (match_operand:DI 0 "register_operand" "=d")
-        (and:DI (subreg:DI (match_operand:SI 1 "memory_operand" "m") 0)
-               (const_int 2147483647)))]
-  "TARGET_64BIT"
-  "llgt\t%0,%1"
-  [(set_attr "op_type"  "RXE")])
-
-(define_insn_and_split "*llgt_sidi_split"
-  [(set (match_operand:DI 0 "register_operand" "=d")
-        (and:DI (subreg:DI (match_operand:SI 1 "memory_operand" "m") 0)
-               (const_int 2147483647)))
-   (clobber (reg:CC 33))]
-  "TARGET_64BIT"
-  "#"
-  "&& reload_completed"
-  [(set (match_dup 0)
-        (and:DI (subreg:DI (match_dup 1) 0)
-               (const_int 2147483647)))]
-  "")
-
 ;
 ; zero_extendqidi2 instruction pattern(s)
 ;
index 5eb642e..ecdc105 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-18  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       PR target/20054
+       * gcc.dg/pr20054.c: New test.
+
 2005-01-20  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
 
         PR c++/19508
diff --git a/gcc/testsuite/gcc.dg/pr20054.c b/gcc/testsuite/gcc.dg/pr20054.c
new file mode 100644 (file)
index 0000000..292b856
--- /dev/null
@@ -0,0 +1,23 @@
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-strict-aliasing" } */
+
+
+unsigned int *foo (void);
+
+char *
+bar (double *d)
+{
+  return (char *) (d + 1) - sizeof (unsigned int);
+}
+
+char
+baz (double x)
+{
+  unsigned int h = *foo ();
+  unsigned int l = *(unsigned int *) bar (&x);
+
+  return (h & ~0x80000000L) == 0x7FF00000 && l == 0;
+}
+
+