diff options
author | Richard Guenther <rguenther@suse.de> | 2012-03-07 09:24:40 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-03-07 09:24:40 +0000 |
commit | f409d239aeaa0f7f858163f678febc3603b107dd (patch) | |
tree | 9cab032721dc229018addcfb2dfbd32b743e3538 /gcc/tree-ssa-math-opts.c | |
parent | 0effc3f961337abd0edb7c1a3dcd4b98636c085c (diff) | |
download | gcc-f409d239aeaa0f7f858163f678febc3603b107dd.zip gcc-f409d239aeaa0f7f858163f678febc3603b107dd.tar.gz gcc-f409d239aeaa0f7f858163f678febc3603b107dd.tar.bz2 |
tree-ssa-math-opts.c (convert_mult_to_widen): Check actual precision against gimple constraints.
2012-03-07 Richard Guenther <rguenther@suse.de>
* tree-ssa-math-opts.c (convert_mult_to_widen): Check actual
precision against gimple constraints.
From-SVN: r185026
Diffstat (limited to 'gcc/tree-ssa-math-opts.c')
-rw-r--r-- | gcc/tree-ssa-math-opts.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c index a00541f..ab982f5 100644 --- a/gcc/tree-ssa-math-opts.c +++ b/gcc/tree-ssa-math-opts.c @@ -2158,6 +2158,8 @@ convert_mult_to_widen (gimple stmt, gimple_stmt_iterator *gsi) /* Ensure that the inputs to the handler are in the correct precison for the opcode. This will be the full mode size. */ actual_precision = GET_MODE_PRECISION (actual_mode); + if (2 * actual_precision > TYPE_PRECISION (type)) + return false; if (actual_precision != TYPE_PRECISION (type1) || from_unsigned1 != TYPE_UNSIGNED (type1)) { |