AVX-512: Fixed BT instruction selection.
authorElena Demikhovsky <elena.demikhovsky@intel.com>
Tue, 19 Jul 2016 07:14:21 +0000 (07:14 +0000)
committerElena Demikhovsky <elena.demikhovsky@intel.com>
Tue, 19 Jul 2016 07:14:21 +0000 (07:14 +0000)
commit2c0780b8e5ce9b65a8e957f015f218c52ba38971
tree25f05ad16d1622e25b243c4ebb36faa5114e6aac
parent603018af4037cf25f5f210806c85f709efa05324
AVX-512: Fixed BT instruction selection.

The following condition expression ( a >> n) & 1 is converted to "bt a, n" instruction. It works on all intel targets.
But on AVX-512 it was broken because the expression is modified to (truncate (a >>n) to i1).

I added the new sequence (truncate (a >>n) to i1) to the BT pattern.

Differential Revision: https://reviews.llvm.org/D22354

llvm-svn: 275950
llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/bt.ll