[X86][SSE] Fold select(X > -1, A, B) -> select(0 > X, B, A) (PR47404)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 3 Sep 2020 11:55:14 +0000 (12:55 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 3 Sep 2020 12:02:08 +0000 (13:02 +0100)
commite56edb801bbd41925dbaca39162731613fb289f4
tree557d2338d4e71dfdfb333d847812819de54f0799
parentc5716447c14fed608b107cbc732a80b4528ae21a
[X86][SSE] Fold select(X > -1, A, B) -> select(0 > X, B, A) (PR47404)

Help PBLENDVB peek through to the sign bit source of the selection mask by swapping the select condition and inputs.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/combine-sse41-intrinsics.ll