[AArch64] Promote f16 SELECT_CC CC operands when op is legal.
authorAhmed Bougacha <ahmed.bougacha@gmail.com>
Tue, 17 Nov 2015 16:45:40 +0000 (16:45 +0000)
committerAhmed Bougacha <ahmed.bougacha@gmail.com>
Tue, 17 Nov 2015 16:45:40 +0000 (16:45 +0000)
commit03629a3cf4bad6d4eb4ddbd67d918c9556053316
tree66260d97cf6d432595cfe27db506517a7ea5f18a
parenta17892dba0312a9bcd27938cf99bc32da1203cd7
[AArch64] Promote f16 SELECT_CC CC operands when op is legal.

SELECT_CC has the nasty property of having operands with unrelated
types. So if you do something like:

  f32 = select_cc f16, f16, f32, f32, cc

You'd only look for the action for <select_cc, f32>, but never f16.
If the types are all legal, but the op isn't (as for f16 on AArch64,
or for f128 on x86_64/AArch64?), then you get into trouble.
For f128, we have softenSetCCOperands to handle this case.

Similarly, for f16, we can directly promote the CC operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253344 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
test/CodeGen/AArch64/f16-instructions.ll