[SCEV] List all binops in getOperandsToCreate()
authorNikita Popov <npopov@redhat.com>
Fri, 15 Jul 2022 15:06:07 +0000 (17:06 +0200)
committerNikita Popov <npopov@redhat.com>
Fri, 15 Jul 2022 15:08:48 +0000 (17:08 +0200)
commit2659e1bf4b54cf9c2fadac0813e5e0ab4d2c49d5
treee931f6aa2b9194eece2e538769f8118b735b47b4
parentc720b6fddd22d8521cdebb8244d0af437dcafc25
[SCEV] List all binops in getOperandsToCreate()

Explicitly list all binops rather than having a default case. There
were two bugs here:
1. U->getOpcode() was used instead of BO->Opcode, which means we
   used the logic for the wrong opcode in some cases.
2. SCEV construction does not support LShr. We should return
   unknown for it rather than recursing into the operands.
llvm/lib/Analysis/ScalarEvolution.cpp