[PATCH] D60922: [GlobalISel] Add IRTranslator support for G_FNEARBYINT
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 25 09:37:34 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL359203: [GlobalISel] Add IRTranslator support for G_FNEARBYINT (authored by paquette, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D60922?vs=195912&id=196659#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60922/new/
https://reviews.llvm.org/D60922
Files:
llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
Index: llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
+++ llvm/trunk/lib/CodeGen/GlobalISel/IRTranslator.cpp
@@ -788,6 +788,8 @@
return TargetOpcode::G_FLOG2;
case Intrinsic::log10:
return TargetOpcode::G_FLOG10;
+ case Intrinsic::nearbyint:
+ return TargetOpcode::G_FNEARBYINT;
case Intrinsic::pow:
return TargetOpcode::G_FPOW;
case Intrinsic::rint:
Index: llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
===================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
@@ -2333,6 +2333,14 @@
ret float %y
}
+declare float @llvm.nearbyint.f32(float)
+define float @test_nearbyint_f32(float %x) {
+ ; CHECK-LABEL: name: test_nearbyint_f32
+ ; CHECK: %{{[0-9]+}}:_(s32) = G_FNEARBYINT %{{[0-9]+}}
+ %y = call float @llvm.nearbyint.f32(float %x)
+ ret float %y
+}
+
; CHECK-LABEL: name: test_llvm.aarch64.neon.ld3.v4i32.p0i32
; CHECK: %1:_(<4 x s32>), %2:_(<4 x s32>), %3:_(<4 x s32>) = G_INTRINSIC_W_SIDE_EFFECTS intrinsic(@llvm.aarch64.neon.ld3), %0(p0) :: (load 48 from %ir.ptr, align 64)
define void @test_llvm.aarch64.neon.ld3.v4i32.p0i32(i32* %ptr) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60922.196659.patch
Type: text/x-patch
Size: 1408 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190425/aeece56d/attachment.bin>
More information about the llvm-commits
mailing list