[llvm] 68ef0b6 - [PowerPC] Pre-commit test case of float rounding in kernel build. NFC.
Kai Luo via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 19:18:25 PDT 2020
Author: Kai Luo
Date: 2020-04-07T02:07:58Z
New Revision: 68ef0b6a4918413a69544c8029dffb365e76392f
URL: https://github.com/llvm/llvm-project/commit/68ef0b6a4918413a69544c8029dffb365e76392f
DIFF: https://github.com/llvm/llvm-project/commit/68ef0b6a4918413a69544c8029dffb365e76392f.diff
LOG: [PowerPC] Pre-commit test case of float rounding in kernel build. NFC.
Added:
llvm/test/CodeGen/PowerPC/kernel-fp-round.ll
Modified:
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/PowerPC/kernel-fp-round.ll b/llvm/test/CodeGen/PowerPC/kernel-fp-round.ll
new file mode 100644
index 000000000000..c01f75c5e8d5
--- /dev/null
+++ b/llvm/test/CodeGen/PowerPC/kernel-fp-round.ll
@@ -0,0 +1,14 @@
+; RUN: llc -simplify-mir -verify-machineinstrs -stop-after=finalize-isel \
+; RUN: -mtriple=powerpc64le-unknown-unknown -mattr=-vsx < %s | FileCheck %s
+
+define float @test(float %a) {
+; CHECK: stack:
+; CHECK-NEXT: - { id: 0, size: 4, alignment: 4 }
+; CHECK: %2:f8rc = FCTIWZ killed %1, implicit $rm
+; CHECK: STFIWX killed %2, $zero8, %3
+; CHECK-NEXT: %4:f8rc = LFIWAX $zero8, %3 :: (load 4 from %stack.0, align 1)
+entry:
+ %b = fptosi float %a to i32
+ %c = sitofp i32 %b to float
+ ret float %c
+}
More information about the llvm-commits
mailing list