summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-30 06:53:46 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-30 06:53:46 +0000
commit77b4556a2f1954c4ffde49b7d19604d82f9b5e3e (patch)
tree716cc6742c97b8f4aa23addb4244350e75ac4657
parentdf084314d8c12acbc59eaf20f35530300ceaa9fe (diff)
downloadgcc-77b4556a2f1954c4ffde49b7d19604d82f9b5e3e.tar.gz
PR rtl-optimization/53519
* combine.c (simplify_shift_const_1) <case NOT>: Use constm1_rtx instead of GEN_INT (GET_MODE_MASK (mode)) as second operand of XOR. * gcc.c-torture/compile/pr53519.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188001 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/combine.c3
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr53519.c26
4 files changed, 38 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7999a502aa6..b915e682a45 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/53519
+ * combine.c (simplify_shift_const_1) <case NOT>: Use constm1_rtx
+ instead of GEN_INT (GET_MODE_MASK (mode)) as second operand of XOR.
+
2012-05-30 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
* config/arm/arm.c (arm_evpc_neon_vrev): Adjust off by one error.
diff --git a/gcc/combine.c b/gcc/combine.c
index d23ecfcbccd..d6897a17958 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -10284,8 +10284,7 @@ simplify_shift_const_1 (enum rtx_code code, enum machine_mode result_mode,
break;
/* Make this fit the case below. */
- varop = gen_rtx_XOR (mode, XEXP (varop, 0),
- GEN_INT (GET_MODE_MASK (mode)));
+ varop = gen_rtx_XOR (mode, XEXP (varop, 0), constm1_rtx);
continue;
case IOR:
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7e52cb9499a..2f42a8e671e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/53519
+ * gcc.c-torture/compile/pr53519.c: New test.
+
2012-05-30 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
* gcc.target/arm/neon-vrev.c: New.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53519.c b/gcc/testsuite/gcc.c-torture/compile/pr53519.c
new file mode 100644
index 00000000000..3adadcb2c0e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr53519.c
@@ -0,0 +1,26 @@
+/* PR rtl-optimization/53519 */
+
+int a, b, c, d, e;
+
+short int
+foo (short int x)
+{
+ return a == 0 ? x : 0;
+}
+
+short int
+bar (int x, int y)
+{
+ return x + y;
+}
+
+void
+baz (void)
+{
+ if (!e)
+ {
+ int f = foo (65535 ^ b);
+ if (bar (!6L <= ~f, ~e) == c)
+ d = 0;
+ }
+}