[ARM] Select VMAXNM and VMINNM regardless of operand order
authorOliver Stannard <oliver.stannard@arm.com>
Mon, 27 Oct 2014 09:23:02 +0000 (09:23 +0000)
committerOliver Stannard <oliver.stannard@arm.com>
Mon, 27 Oct 2014 09:23:02 +0000 (09:23 +0000)
commitb1d8e7e77c71e1bf41c978f13f0bc963aab580ac
treefdc16ce603d458c8e341efe74b88fee9972dd8d8
parent75bb472c0612fe905e15e3ceec558d70dcda9dd5
[ARM] Select VMAXNM and VMINNM regardless of operand order

Currently, the ARM backend will select the VMAXNM and VMINNM for these C
expressions:
  (a < b) ? a : b
  (a > b) ? a : b
but not these expressions:
  (a > b) ? b : a
  (a < b) ? b : a

This patch allows all of these expressions to be matched.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220671 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/vminmaxnm.ll