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).
This commit is contained in:
Wink Saville 2018-08-07 20:18:26 -07:00 committed by Andrew Kelley
parent a583beb76c
commit d927f347de

View File

@ -20591,7 +20591,7 @@ static TypeTableEntry *ir_analyze_instruction_atomic_rmw(IrAnalyze *ira, IrInstr
return ira->codegen->builtin_types.entry_invalid; return ira->codegen->builtin_types.entry_invalid;
IrInstruction *casted_operand = ir_implicit_cast(ira, operand, operand_type); 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; return ira->codegen->builtin_types.entry_invalid;
AtomicOrder ordering; AtomicOrder ordering;