mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-07 11:04:17 +00:00
Ignore ir_emit_byte_swap for constant values
This commit is contained in:
@@ -4372,6 +4372,9 @@ irValue *ir_emit_uintptr_to_ptr(irProcedure *proc, irValue *value, Type *t) {
|
||||
|
||||
irValue *ir_emit_byte_swap(irProcedure *proc, irValue *value, Type *t) {
|
||||
Type *vt = core_type(ir_type(value));
|
||||
if (is_type_untyped(vt)) {
|
||||
return value;
|
||||
}
|
||||
GB_ASSERT(type_size_of(vt) == type_size_of(t));
|
||||
return ir_emit(proc, ir_instr_conv(proc, irConv_byteswap, value, vt, t));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user