This reverts commit fec01ee3f5. According to asan, this patch introduces a heap use after free.
fec01ee3f5
phi
TruncInstCombine