[cfe-commits] r108713 - /cfe/trunk/test/CodeGenObjC/fpret.m

Daniel Dunbar daniel at zuster.org
Mon Jul 19 10:11:39 PDT 2010


Author: ddunbar
Date: Mon Jul 19 12:11:38 2010
New Revision: 108713

URL: http://llvm.org/viewvc/llvm-project?rev=108713&view=rev
Log:
IRgen: Add a test case I forgot to commit at some point.

Added:
    cfe/trunk/test/CodeGenObjC/fpret.m

Added: cfe/trunk/test/CodeGenObjC/fpret.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/fpret.m?rev=108713&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/fpret.m (added)
+++ cfe/trunk/test/CodeGenObjC/fpret.m Mon Jul 19 12:11:38 2010
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o - %s | \
+// RUN:   FileCheck --check-prefix=CHECK-X86_32 %s
+//
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | \
+// RUN:   FileCheck --check-prefix=CHECK-X86_64 %s
+//
+// RUN: %clang_cc1 -triple armv7-apple-darwin10 -emit-llvm -target-abi apcs-gnu -o - %s | \
+// RUN:   FileCheck --check-prefix=CHECK-ARMV7 %s
+
+ at interface A
+-(float) floatValue;
+-(double) doubleValue;
+-(long double) longDoubleValue;
+ at end
+
+
+// CHECK-X86_32: define void @t0()
+// CHECK-X86_32: call float bitcast {{.*}} @objc_msgSend_fpret to
+// CHECK-X86_32: call double {{.*}} @objc_msgSend_fpret(
+// CHECK-X86_32: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to
+// CHECK-X86_32: }
+//
+// CHECK-X86_64: define void @t0()
+// CHECK-X86_64: call float bitcast {{.*}} @objc_msgSend to
+// CHECK-X86_64: call double bitcast {{.*}} @objc_msgSend to
+// CHECK-X86_64: call x86_fp80 bitcast {{.*}} @objc_msgSend_fpret to
+// CHECK-X86_64: }
+//
+// CHECK-ARMV7: define void @t0()
+// CHECK-ARMV7: call float bitcast {{.*}} @objc_msgSend to
+// CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to
+// CHECK-ARMV7: call double bitcast {{.*}} @objc_msgSend to
+// CHECK-ARMV7: }
+void t0() {
+  [(A*)0 floatValue];
+  [(A*)0 doubleValue];
+  [(A*)0 longDoubleValue];
+}





More information about the cfe-commits mailing list