[ARM] Support float literals under XO
authorChristof Douma <Christof.Douma@arm.com>
Fri, 23 Mar 2018 13:02:03 +0000 (13:02 +0000)
committerChristof Douma <Christof.Douma@arm.com>
Fri, 23 Mar 2018 13:02:03 +0000 (13:02 +0000)
commit4a025cc79d30ba67485cb56639ec89913fce2969
tree48364051d83cdeda06c5044a88a5e6ea04ae59c4
parentf73c3ece7f1004dd5c1b8351a90172258018dd12
[ARM] Support float literals under XO

When targeting execute-only and fp-armv8, float constants in a compare
resulted in instruction selection failures. This is now fixed by using
vmov.f32 where possible, otherwise the floating point constant is
lowered into a integer constant that is moved into a floating point
register.

This patch also restores using fpcmp with immediate 0 under fp-armv8.

Change-Id: Ie87229706f4ed879a0c0cf66631b6047ed6c6443
llvm-svn: 328313
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/lib/Target/ARM/ARMInstrVFP.td
llvm/test/CodeGen/ARM/fcmp-xo.ll [new file with mode: 0644]