diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-20 20:52:22 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-20 20:52:22 +0000 |
commit | 17c7352afd90cbeafd5bc9f05181404dc23390e3 (patch) | |
tree | 4388dee32e8a4305a733e8125fe2e28909b12b3a /gcc/combine.c | |
parent | 714ff98b882f4edeec64ce6fd19b4528bf4726c0 (diff) | |
download | ppe42-gcc-17c7352afd90cbeafd5bc9f05181404dc23390e3.tar.gz ppe42-gcc-17c7352afd90cbeafd5bc9f05181404dc23390e3.zip |
PR rtl-optimization/17099
* combine.c (force_to_mode): Check if inner_mask has any bits set
outside of GET_MODE (x) instead of op_mode.
* gcc.c-torture/execute/20040820-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86339 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 426b0d775e5..a116f81360c 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -7151,9 +7151,8 @@ force_to_mode (rtx x, enum machine_mode mode, unsigned HOST_WIDE_INT mask, /* We can only change the mode of the shift if we can do arithmetic in the mode of the shift and INNER_MASK is no wider than the - width of OP_MODE. */ - if (GET_MODE_BITSIZE (op_mode) > HOST_BITS_PER_WIDE_INT - || (inner_mask & ~GET_MODE_MASK (op_mode)) != 0) + width of X's mode. */ + if ((inner_mask & ~GET_MODE_MASK (GET_MODE (x))) != 0) op_mode = GET_MODE (x); inner = force_to_mode (inner, op_mode, inner_mask, reg, next_select); |