From d927f347de1f5a19545fc235f8779c2326409543 Mon Sep 17 00:00:00 2001 From: Wink Saville Date: Tue, 7 Aug 2018 20:18:26 -0700 Subject: [PATCH] Fix ir_analyze_instruction_atomic_rmw (#1351) There were two tests of type_is_valid(casted_ptr->value.type) change the second one to type_is_valie(casted_operand->value.type). --- src/ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ir.cpp b/src/ir.cpp index 3e423487aa9b67f917974404d0bfd7b79f25b104..d9df5772db171d9267463599f5bd633e1d46bde3 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -20591,7 +20591,7 @@ static TypeTableEntry *ir_analyze_instruction_atomic_rmw(IrAnalyze *ira, IrInstr return ira->codegen->builtin_types.entry_invalid; IrInstruction *casted_operand = ir_implicit_cast(ira, operand, operand_type); - if (type_is_invalid(casted_ptr->value.type)) + if (type_is_invalid(casted_operand->value.type)) return ira->codegen->builtin_types.entry_invalid; AtomicOrder ordering; -- 2.54.0