Skip to content

Commit 08fb49d

Browse files
ArtemKhelKakadu
authored andcommitted
fix id lookup in 'is_rewrites_regs'
1 parent 002c61d commit 08fb49d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

AsdfML/lib/riscv/riscv64.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ and gen_cexpr env dest = function
112112
let is_rewrites_regs = function
113113
| ImmNil | ImmTuple _ | ImmList _ -> true
114114
| ImmId id ->
115-
(match Map.find !fn_args id with
115+
(match Map.find !fn_args (Option.value (Std.lookup_extern id) ~default:id) with
116116
| Some _ -> true
117117
| None -> false)
118118
| _ -> false

0 commit comments

Comments
 (0)