mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix case where occasionally atomic_load would miscompile.
This commit is contained in:
@@ -3064,6 +3064,8 @@ void llvm_emit_int_comp_raw(GenContext *c, BEValue *result, Type *lhs_type, Type
|
||||
}
|
||||
}
|
||||
}
|
||||
ASSERT(LLVMTypeOf(lhs_value) == LLVMTypeOf(rhs_value));
|
||||
|
||||
if (lhs_signed && !rhs_signed && !vector_type && llvm_is_const(lhs_value) && type_size(lhs_type) <= 8)
|
||||
{
|
||||
long long val = LLVMConstIntGetSExtValue(lhs_value);
|
||||
|
||||
Reference in New Issue
Block a user