aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2005-11-06 05:34:38 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2005-11-06 05:34:38 +0000
commit1f2a3c8f5e220138bfdb2eb724acedcbe6515d39 (patch)
tree3d8809ecbb8eb6e7c7e9c34c78163e49726b4c8e /gcc/combine.c
parentd4a43a05fa45c6493f70ec6d494d1e07eda98763 (diff)
downloadgcc-1f2a3c8f5e220138bfdb2eb724acedcbe6515d39.zip
gcc-1f2a3c8f5e220138bfdb2eb724acedcbe6515d39.tar.gz
gcc-1f2a3c8f5e220138bfdb2eb724acedcbe6515d39.tar.bz2
re PR target/22432 (Wrong code generation using MMX intrinsics on amd64)
./: PR target/22432 * combine.c (apply_distributive_law): Don't distribute across a vector mode subreg. testsuite/: PR target/22432 * gcc.target/i386/pr22432.c: New test. From-SVN: r106555
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index ff10663..82d260d 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -8117,14 +8117,15 @@ apply_distributive_law (rtx x)
break;
case SUBREG:
- /* Non-paradoxical SUBREGs distributes over all operations, provided
- the inner modes and byte offsets are the same, this is an extraction
- of a low-order part, we don't convert an fp operation to int or
- vice versa, and we would not be converting a single-word
- operation into a multi-word operation. The latter test is not
- required, but it prevents generating unneeded multi-word operations.
- Some of the previous tests are redundant given the latter test, but
- are retained because they are required for correctness.
+ /* Non-paradoxical SUBREGs distributes over all operations,
+ provided the inner modes and byte offsets are the same, this
+ is an extraction of a low-order part, we don't convert an fp
+ operation to int or vice versa, this is not a vector mode,
+ and we would not be converting a single-word operation into a
+ multi-word operation. The latter test is not required, but
+ it prevents generating unneeded multi-word operations. Some
+ of the previous tests are redundant given the latter test,
+ but are retained because they are required for correctness.
We produce the result slightly differently in this case. */
@@ -8135,6 +8136,7 @@ apply_distributive_law (rtx x)
!= GET_MODE_CLASS (GET_MODE (SUBREG_REG (lhs))))
|| (GET_MODE_SIZE (GET_MODE (lhs))
> GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs))))
+ || VECTOR_MODE_P (GET_MODE (lhs))
|| GET_MODE_SIZE (GET_MODE (SUBREG_REG (lhs))) > UNITS_PER_WORD)
return x;