aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-ccp.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-11-15 17:37:10 -0800
committerH.J. Lu <hjl.tools@gmail.com>2021-11-15 19:23:58 -0800
commit074ee8d9a91d7573c1e8774a22e4e08f923adb18 (patch)
tree488df1f360dcf7770fa4c792cdf75de61a061600 /gcc/tree-ssa-ccp.c
parenta031aaa2ac9d4c74994df085a0d8c79bd55792c9 (diff)
downloadgcc-074ee8d9a91d7573c1e8774a22e4e08f923adb18.zip
gcc-074ee8d9a91d7573c1e8774a22e4e08f923adb18.tar.gz
gcc-074ee8d9a91d7573c1e8774a22e4e08f923adb18.tar.bz2
Add a missing return when transforming atomic bit test and operations
When failing to transform equivalent, but slighly different cases of atomic bit test and operations to their canonical forms, return immediately. gcc/ PR middle-end/103268 * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Add a missing return. gcc/testsuite/ PR middle-end/103268 * gcc.dg/pr103268-1.c: New test. * gcc.dg/pr103268-2.c: Likewise.
Diffstat (limited to 'gcc/tree-ssa-ccp.c')
-rw-r--r--gcc/tree-ssa-ccp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 0666dc6..18d5772 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -3638,6 +3638,8 @@ optimize_atomic_bit_test_and (gimple_stmt_iterator *gsip,
use_stmt = use_nop_stmt;
}
}
+ else
+ return;
if (!bit)
{