[NFC][InstCombine] fold-nested-selects: fix profitability check
authorRoman Lebedev <lebedev.ri@gmail.com>
Mon, 12 Dec 2022 18:31:33 +0000 (21:31 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Mon, 12 Dec 2022 22:03:38 +0000 (01:03 +0300)
commit79909c031d43de21ce9c10394a5aac08bec0a874
treef5cca3997fd5eb430ce90f91a134cfcee08f2868
parentf529a9f324a8eb4a0f2c5e662b6c57a6a775d62f
[NFC][InstCombine] fold-nested-selects: fix profitability check

We'd check the cost of the wrong 'cond', after potentially skipping `not`.
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/nested-select.ll