[PATCH] D11355: Fix for PR24179 - mem2reg generates incorrect code
gil.rapaport at intel.com
Mon Jul 20 08:38:02 PDT 2015
gilr created this revision.
gilr added reviewers: sanjoy, mkuper.
gilr added a subscriber: llvm-commits.
Patch implements the logic described in main comment of promoteSingleBlockAlloca for loads not preceded by a store:
- If there are no stores before the load, it is (still) replaced by an undef (test2 in the added lit test)
- IF there are any stores, but none preceding the load we bail out and let the rest of Mem2Reg's machinery handle this alloca, as the load may be affected by a following store, depending on the CFG (test1 in the added lit test).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4499 bytes
Desc: not available
More information about the llvm-commits