[SCEV] Try simplifying phi before createNodeFromSelectLikePHI()
authorNikita Popov <npopov@redhat.com>
Thu, 27 Apr 2023 13:05:03 +0000 (15:05 +0200)
committerNikita Popov <npopov@redhat.com>
Thu, 27 Apr 2023 13:07:19 +0000 (15:07 +0200)
commit079c525f206228c3343048bb5a74a8e9a428de1a
tree2275e959aca7e38c606d6f08133cd2ff486fc777
parent6cfcf0242f3260a3a90bac68e9f271548caa8372
[SCEV] Try simplifying phi before createNodeFromSelectLikePHI()

Sometimes a phi can both be trivial and match the
createNodeFromSelectLikePHI() fold. In that case it is generally
more profitable to look through the phi node.
llvm/lib/Analysis/ScalarEvolution.cpp
llvm/test/Analysis/ScalarEvolution/trivial-phis.ll
llvm/test/Transforms/IndVarSimplify/lftr-pr20680.ll