[InstCombine] Do not assume scalar types in `select`/`zext`
authorAntonio Frighetto <me@antoniofrighetto.com>
Sun, 23 Jul 2023 10:52:47 +0000 (10:52 +0000)
committerAntonio Frighetto <me@antoniofrighetto.com>
Sun, 23 Jul 2023 11:07:13 +0000 (11:07 +0000)
commitac3f6899f45cfbaf53fa503e4100e92a731b2e7b
treec8877235d7ffb8d20f4b02ffa0574f08b8529ede
parentbfec706cf766bf47151300450edca669692f527a
[InstCombine] Do not assume scalar types in `select`/`zext`

Do not assume scalar types when folding binops of `select`
operations and `zext`/`sext` of their condition.

Reported-by: Benjins, dyung
Proofs: https://alive2.llvm.org/ce/z/GmDLns
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/binop-select-cast-of-select-cond.ll