swift
f6ccefea - Loosen a CopyForwarding assert: store instead of deinit. (#32641)

Commit
5 years ago
Loosen a CopyForwarding assert: store instead of deinit. (#32641) CopyForwarding attempts to enforce "normal" SIL address patterns using asserts. This isn't a good strategy because it results in strange crash diagnostics in release builds. Eventually, we should replace this logic with a SIL address lifetime utility based on OSSA form and enforced in the verifier. Loosen one of these restrictions where we assume that a value initialized with "copy_addr [initialization]" will be properly destroyed. This assumption is violated when lowering .int_fma_FPIEEE32, which knows that the type is trivial, so avoids deinitialization. The original SIL looks like this: copy_addr %src to [initialization] %dest : $*Float %fma = builtin "int_fma_FPIEEE32"(% : $Builtin.FPIEEE32, % : $Builtin.FPIEEE32, % : $Builtin.FPIEEE32) : $Builtin.FPIEEE32 %result = struct $Float (%fma : $Builtin.FPIEEE32) store %result to %dest : $*Float Fixes rdar://64671864.
Author
Parents
Loading