[InstCombine] Handle integer extension in `select` patterns using the condition as...
authorMarkus Böck <markus.boeck02@gmail.com>
Tue, 20 Sep 2022 20:12:10 +0000 (22:12 +0200)
committerMarkus Böck <markus.boeck02@gmail.com>
Tue, 20 Sep 2022 20:25:13 +0000 (22:25 +0200)
commitb751da43b2bdccda78f30ac8411b6396c0be6874
treeb28a0072afb886591fa532f27d9471b839f78a65
parent8a131190070152ffb0a27ab5dd14d98052467aa9
[InstCombine] Handle integer extension in `select` patterns using the condition as value

These patterns were previously only implemented for i1 type but can be extended for any integer type by also handling zext and sext operands.

Differential Revision: https://reviews.llvm.org/D134142
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/select.ll