[all-commits] [llvm/llvm-project] 59c6d7: [CodeGenPrepare] Make sure instruction get from Su...
weiguozhi via All-commits
all-commits at lists.llvm.org
Thu May 15 09:27:46 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 59c6d70ed8120b8864e5f796e2bf3de5518a0ef0
https://github.com/llvm/llvm-project/commit/59c6d70ed8120b8864e5f796e2bf3de5518a0ef0
Author: weiguozhi <57237827+weiguozhi at users.noreply.github.com>
Date: 2025-05-15 (Thu, 15 May 2025)
Changed paths:
M llvm/lib/CodeGen/CodeGenPrepare.cpp
A llvm/test/Transforms/CodeGenPrepare/X86/sink-addr-reuse.ll
Log Message:
-----------
[CodeGenPrepare] Make sure instruction get from SunkAddrs is before MemoryInst (#139303)
Function optimizeBlock may do optimizations on a block for multiple
times. In the first iteration of the loop, MemoryInst1 may generate a
sunk instruction and store it into SunkAddrs. In the second iteration of
the loop, MemoryInst2 may use the same address and then it can reuse the
sunk instruction stored in SunkAddrs, but MemoryInst2 may be before
MemoryInst1 and the corresponding sunk instruction. In order to avoid
use before def error, we need to find appropriate insert position for the
sunk instruction.
Fixes #138208.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list