aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2005-02-18 21:11:06 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2005-02-18 21:11:06 +0000
commitd6083c7d69ace6293905f43dc3f182b1e5a9c7fc (patch)
tree02761e6cc31244dd7c6e6cc8cd52b233b977ec70 /gcc
parent0ae65c915a3fcae67ac5e1c7be4ffa2ad1ac70e9 (diff)
downloadgcc-d6083c7d69ace6293905f43dc3f182b1e5a9c7fc.zip
gcc-d6083c7d69ace6293905f43dc3f182b1e5a9c7fc.tar.gz
gcc-d6083c7d69ace6293905f43dc3f182b1e5a9c7fc.tar.bz2
re PR target/20054 (ICE in change_address_1)
ChangeLog: 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. From-SVN: r95233
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/s390/s390.md42
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr20054.c23
4 files changed, 55 insertions, 21 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f448cc19..8271af2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 752d294..a0b9a31 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -2660,6 +2660,27 @@
; 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")
@@ -2702,27 +2723,6 @@
(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)
;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 5eb642ec..ecdc105 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 0000000..292b856
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr20054.c
@@ -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;
+}
+
+