aboutsummaryrefslogtreecommitdiff
path: root/gcc/tsan.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tsan.c')
-rw-r--r--gcc/tsan.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tsan.c b/gcc/tsan.c
index ebafbb0..2752182 100644
--- a/gcc/tsan.c
+++ b/gcc/tsan.c
@@ -535,7 +535,7 @@ instrument_builtin_call (gimple_stmt_iterator *gsi)
case fetch_op:
last_arg = gimple_call_arg (stmt, num - 1);
if (!tree_fits_uhwi_p (last_arg)
- || tree_to_uhwi (last_arg) > MEMMODEL_SEQ_CST)
+ || memmodel_base (tree_to_uhwi (last_arg)) >= MEMMODEL_LAST)
return;
gimple_call_set_fndecl (stmt, decl);
update_stmt (stmt);
@@ -600,10 +600,10 @@ instrument_builtin_call (gimple_stmt_iterator *gsi)
for (j = 0; j < 6; j++)
args[j] = gimple_call_arg (stmt, j);
if (!tree_fits_uhwi_p (args[4])
- || tree_to_uhwi (args[4]) > MEMMODEL_SEQ_CST)
+ || memmodel_base (tree_to_uhwi (args[4])) >= MEMMODEL_LAST)
return;
if (!tree_fits_uhwi_p (args[5])
- || tree_to_uhwi (args[5]) > MEMMODEL_SEQ_CST)
+ || memmodel_base (tree_to_uhwi (args[5])) >= MEMMODEL_LAST)
return;
update_gimple_call (gsi, decl, 5, args[0], args[1], args[2],
args[4], args[5]);