[llvm] r290844 - [InstCombine] use combineMetadataForCSE instead of copying it; NFCI

Friedman, Eli via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 11:04:42 PST 2017


On 1/3/2017 8:21 AM, Sanjay Patel via llvm-commits wrote:
> Ah, right. I hacked my local source with this (I'm guessing this isn't 
> safe...) to see the subsequent problem:
>
> Index: lib/Analysis/Loads.cpp
> ===================================================================
> --- lib/Analysis/Loads.cpp    (revision 290827)
> +++ lib/Analysis/Loads.cpp    (working copy)
> @@ -382,8 +382,8 @@
>            return nullptr;
>
>          if (IsLoadCSE)
> -          *IsLoadCSE = false;
> -        return SI->getOperand(0);
> +          *IsLoadCSE = isa<LoadInst>(SI->getValueOperand());
> +        return SI->getValueOperand();
>        }

We intentionally don't combine the metadata for your testcase, because 
it isn't CSE; see https://reviews.llvm.org/rL272868 .

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project



More information about the llvm-commits mailing list