File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -255,15 +255,20 @@ end
255255 API. moveBefore (newo, err, B)
256256 normal =
257257 (unsafe_load (normalR) != C_NULL ) ? LLVM. Instruction (unsafe_load (normalR)) : nothing
258- if shadowR != C_NULL && normal != = nothing
259- t_shadow = normal
258+ if shadowR != C_NULL
259+ t_shadow1 = if normal != = nothing
260+ normal
261+ else
262+ LLVM. null (value_type (orig))
263+ end
264+ t_shadow = t_shadow1
260265 width = get_width (gutils)
261266 if width != 1
262267 t_shadow = UndefValue (
263- LLVM. LLVMType (API. EnzymeGetShadowType (width, value_type (normal ))),
268+ LLVM. LLVMType (API. EnzymeGetShadowType (width, value_type (t_shadow1 ))),
264269 )
265270 for idx = 1 : width
266- t_shadow = insert_value! (B, t_shadow, normal , idx - 1 )
271+ t_shadow = insert_value! (B, t_shadow, t_shadow1 , idx - 1 )
267272 end
268273 end
269274 unsafe_store! (shadowR, t_shadow. ref)
You can’t perform that action at this time.
0 commit comments