[AArch64][GlobalISel] Teach RBS about G_FNEG default mapping.

llvm-svn: 352340
This commit is contained in:
Amara Emerson 2019-01-28 03:21:14 +00:00
parent d258c80414
commit fd31bf95c1
2 changed files with 15 additions and 0 deletions

View File

@ -392,6 +392,7 @@ static bool isPreISelGenericFloatingPointOpcode(unsigned Opc) {
case TargetOpcode::G_FPEXT:
case TargetOpcode::G_FPTRUNC:
case TargetOpcode::G_FCEIL:
case TargetOpcode::G_FNEG:
return true;
}
return false;

View File

@ -59,6 +59,7 @@
define void @test_fptrunc_s32_s64() { ret void }
define void @test_fconstant_s32() { ret void }
define void @test_fneg_s32() { ret void }
define void @test_fcmp_s32() { ret void }
@ -678,6 +679,19 @@ body: |
%0(s32) = G_FCONSTANT float 1.0
...
---
name: test_fneg_s32
legalized: true
body: |
bb.0:
liveins: $s0
; CHECK-LABEL: name: test_fneg_s32
; CHECK: [[COPY:%[0-9]+]]:fpr(s32) = COPY $s0
; CHECK: [[FNEG:%[0-9]+]]:fpr(s32) = G_FNEG [[COPY]]
%0:_(s32) = COPY $s0
%1:_(s32) = G_FNEG %0(s32)
...
---
name: test_fcmp_s32
legalized: true