[InstCombine] Fold extractvalue of phi
authorNikita Popov <npopov@redhat.com>
Thu, 1 Sep 2022 08:48:49 +0000 (10:48 +0200)
committerNikita Popov <npopov@redhat.com>
Thu, 1 Sep 2022 08:51:54 +0000 (10:51 +0200)
commit43e7d9af1d319693b3302560b447366ba359f1a2
tree1220249c3db27e1153f719a04e6a818e4f0774f1
parent5b219dd9e906c94a97c92e6bf9b2360f6f279f96
[InstCombine] Fold extractvalue of phi

Just as we do for most other operations, we should push
extractvalue instructions through phis, if this does not increase
unfolded instruction count.
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/phi-extractvalue.ll