[PATCH] D39841: [CodeGenPrepare] Check that erased sunken address are not reused
John Brawn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 16 07:21:20 PST 2017
john.brawn added inline comments.
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:233
+ /// multiple load/stores of the same address. The usage of WeakTrackingVH
+ /// enables SunkAddrs to be treated as a cache whoae entries can be
+ /// invalidated if a sunken address computation has been erased.
----------------
whose
================
Comment at: lib/CodeGen/CodeGenPrepare.cpp:4369-4370
+
+ WeakTrackingVH * SunkAddrVH = SunkAddrs[Addr];
+ Value * SunkAddr = nullptr;
+ if (SunkAddrVH) {
----------------
You no longer have a reference to an element of SunkAddrs here, which means SunkAddrs never has anything added to it so we never reuse a sunk addrmode. test3 in test/Transforms/CodeGenPrepare/X86/sink-addrmode.ll was trying to test this but had a misplaced comma: I've just now fixed that and so I now see a test failure with this patch.
https://reviews.llvm.org/D39841
More information about the llvm-commits
mailing list