diff options
author | Ian Lance Taylor <iant@golang.org> | 2023-06-26 09:57:21 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2023-06-26 09:57:21 -0700 |
commit | aa1e672b5d99102b03eb5fb9c51609c45f62bff7 (patch) | |
tree | 886212591b1c9d127eaaf234a4a2e22452ea384a /gcc/c-family/c-common.cc | |
parent | 97e31a0a2a2d2273687fcdb4e5416aab1a2186e1 (diff) | |
parent | 3a39a31b8ae9c6465434aefa657f7fcc86f905c0 (diff) | |
download | gcc-devel/gccgo.zip gcc-devel/gccgo.tar.gz gcc-devel/gccgo.tar.bz2 |
Merge from trunk revision 3a39a31b8ae9c6465434aefa657f7fcc86f905c0.devel/gccgo
Diffstat (limited to 'gcc/c-family/c-common.cc')
-rw-r--r-- | gcc/c-family/c-common.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/c-family/c-common.cc b/gcc/c-family/c-common.cc index 9c8eed5..34566a3 100644 --- a/gcc/c-family/c-common.cc +++ b/gcc/c-family/c-common.cc @@ -1338,6 +1338,10 @@ shorten_binary_op (tree result_type, tree op0, tree op1, bool bitwise) int uns; tree type; + /* Do not shorten vector operations. */ + if (VECTOR_TYPE_P (result_type)) + return result_type; + /* Cast OP0 and OP1 to RESULT_TYPE. Doing so prevents excessive narrowing when we call get_narrower below. For example, suppose that OP0 is of unsigned int extended |