summaryrefslogtreecommitdiff
path: root/test/CodeGen/PowerPC/in-asm-f64-reg.ll
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2012-12-18 17:50:58 +0000
committerHal Finkel <hfinkel@anl.gov>2012-12-18 17:50:58 +0000
commitca2dd36c395f5ead63572d45a2106b9d34d8ca90 (patch)
tree2a974890da559c45f9ecdc5c212d6dc9ba051f5e /test/CodeGen/PowerPC/in-asm-f64-reg.ll
parent04b116e08eefe1ddd4a719889f136c624ee5914e (diff)
downloadllvm-ca2dd36c395f5ead63572d45a2106b9d34d8ca90.tar.gz
llvm-ca2dd36c395f5ead63572d45a2106b9d34d8ca90.tar.bz2
llvm-ca2dd36c395f5ead63572d45a2106b9d34d8ca90.tar.xz
Check multiple register classes for inline asm tied registers
A register can be associated with several distinct register classes. For example, on PPC, the floating point registers are each associated with both F4RC (which holds f32) and F8RC (which holds f64). As a result, this code would fail when provided with a floating point register and an f64 operand because it would happen to find the register in the F4RC class first and return that. From the F4RC class, SDAG would extract f32 as the register type and then assert because of the invalid implied conversion between the f64 value and the f32 register. Instead, search all register classes. If a register class containing the the requested register has the requested type, then return that register class. Otherwise, as before, return the first register class found that contains the requested register. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170436 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/in-asm-f64-reg.ll')
-rw-r--r--test/CodeGen/PowerPC/in-asm-f64-reg.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/PowerPC/in-asm-f64-reg.ll b/test/CodeGen/PowerPC/in-asm-f64-reg.ll
new file mode 100644
index 0000000000..e457849800
--- /dev/null
+++ b/test/CodeGen/PowerPC/in-asm-f64-reg.ll
@@ -0,0 +1,22 @@
+; RUN: llc < %s -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
+
+target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
+target triple = "powerpc64-bgq-linux"
+
+define void @_Z15quad_copy_1024nPcS_m() nounwind {
+; CHECK: @_Z15quad_copy_1024nPcS_m
+
+entry:
+ br i1 undef, label %short_msg, label %if.end
+
+if.end: ; preds = %entry
+ %0 = tail call double* asm sideeffect "qvstfdux $2,$0,$1", "=b,{r7},{f11},0,~{memory}"(i32 64, double undef, double* undef) nounwind, !srcloc !0
+ unreachable
+
+; CHECK: qvstfdux 11,{{[0-9]+}},7
+
+short_msg: ; preds = %entry
+ ret void
+}
+
+!0 = metadata !{i32 -2147422199}