[PATCH] D86530: [InstCombine] PHI-of-extractvalues -> extractvalue-of-PHI, aka invokes are bad

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 04:35:42 PDT 2020


lebedev.ri added a comment.

In D86530#2238463 <https://reviews.llvm.org/D86530#2238463>, @spatel wrote:

> In D86530#2238460 <https://reviews.llvm.org/D86530#2238460>, @lebedev.ri wrote:
>
>> So before i look into `foldAggregateConstructionIntoAggregateReuse()` further,
>> what are your thoughts about teaching InstSimplify to do most basic CSE for PHI nodes?
>> (purely by comparing that the incoming values match)
>
> Instruction::isIdenticalTo()?

Hm, i guess, although that one is broken QoI-wise for PHI's - it assumes identical incoming block order, which isn't something that should be depended upon.

> I see one use of that via visitStoreInst, so there's possible precedent. Start a llvm-dev thread to get other opinions?




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86530/new/

https://reviews.llvm.org/D86530



More information about the llvm-commits mailing list