[InstCombine] fix another poison-unsafe select transformation
authorJuneyoung Lee <aqjune@gmail.com>
Sun, 7 Mar 2021 17:11:01 +0000 (02:11 +0900)
committerJuneyoung Lee <aqjune@gmail.com>
Sun, 7 Mar 2021 17:11:04 +0000 (02:11 +0900)
commit33590ed4f264557ff34702dd61d50484962d667b
treeb605d99f270cabbc6ab8aeaa20d5e04d176a0bd1
parent99108c791de0285ee726a10e8274772b18cee73c
[InstCombine] fix another poison-unsafe select transformation

This fixes another unsafe select folding by disabling it if
EnableUnsafeSelectTransform is set to false.

EnableUnsafeSelectTransform's default value is true, hence it won't
affect generated code (unless the flag is explicitly set to false).
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/select-safe-bool-transforms.ll