Bug fix for PR36787. The regression test is a reduced version of the original reproducer attached to the bug report. When reasoning if it's safe to hoist a load we want to make sure that the defining memory access dominates the new insertion point of the hoisted instruction. safeToHoistLdSt calls firstInBB(InsertionPoint,DefiningAccess) which returns false if InsertionPoint == DefiningAccess, and therefore it falsely thinks it's safe to hoist.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM