aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/CBackend
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-22 04:53:16 +0000
committerChris Lattner <sabre@nondot.org>2008-10-22 04:53:16 +0000
commitaecc22a7b8588d8a91e58aec21c3643b038faf5a (patch)
treee1638036d7d760db1bf8055535b0ef5ccaf711a7 /test/CodeGen/CBackend
parent3b0da26e202cbbeb22508231f4278bda8e995391 (diff)
downloadexternal_llvm-aecc22a7b8588d8a91e58aec21c3643b038faf5a.zip
external_llvm-aecc22a7b8588d8a91e58aec21c3643b038faf5a.tar.gz
external_llvm-aecc22a7b8588d8a91e58aec21c3643b038faf5a.tar.bz2
Fix PR2907 by digging through constant expressions to find FP constants that
are their operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57956 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/CBackend')
-rw-r--r--test/CodeGen/CBackend/2008-10-21-PPCLongDoubleConstant.ll29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/CodeGen/CBackend/2008-10-21-PPCLongDoubleConstant.ll b/test/CodeGen/CBackend/2008-10-21-PPCLongDoubleConstant.ll
new file mode 100644
index 0000000..afcac99
--- /dev/null
+++ b/test/CodeGen/CBackend/2008-10-21-PPCLongDoubleConstant.ll
@@ -0,0 +1,29 @@
+; RUN: llvm-as < %s | llc -march=c
+; PR2907
+target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f128:64:128"
+target triple = "powerpc-apple-darwin9.5"
+ %"struct.Point<0>" = type { %"struct.Tensor<1,0>" }
+ %"struct.QGauss2<1>" = type { %"struct.Quadrature<0>" }
+ %"struct.Quadrature<0>" = type { %struct.Subscriptor, i32, %"struct.std::vector<Point<0>,std::allocator<Point<0> > >", %"struct.std::vector<double,std::allocator<double> >" }
+ %struct.Subscriptor = type { i32 (...)**, i32, %"struct.std::type_info"* }
+ %"struct.Tensor<1,0>" = type { [1 x double] }
+ %"struct.std::_Vector_base<Point<0>,std::allocator<Point<0> > >" = type { %"struct.std::_Vector_base<Point<0>,std::allocator<Point<0> > >::_Vector_impl" }
+ %"struct.std::_Vector_base<Point<0>,std::allocator<Point<0> > >::_Vector_impl" = type { %"struct.Point<0>"*, %"struct.Point<0>"*, %"struct.Point<0>"* }
+ %"struct.std::_Vector_base<double,std::allocator<double> >" = type { %"struct.std::_Vector_base<double,std::allocator<double> >::_Vector_impl" }
+ %"struct.std::_Vector_base<double,std::allocator<double> >::_Vector_impl" = type { double*, double*, double* }
+ %"struct.std::type_info" = type { i32 (...)**, i8* }
+ %"struct.std::vector<Point<0>,std::allocator<Point<0> > >" = type { %"struct.std::_Vector_base<Point<0>,std::allocator<Point<0> > >" }
+ %"struct.std::vector<double,std::allocator<double> >" = type { %"struct.std::_Vector_base<double,std::allocator<double> >" }
+
+define fastcc void @_ZN6QGaussILi1EEC1Ej(%"struct.QGauss2<1>"* %this, i32 %n) {
+entry:
+ br label %bb4
+
+bb4: ; preds = %bb5.split, %bb4, %entry
+ %0 = fcmp ogt ppc_fp128 0xM00000000000000000000000000000000, select (i1 fcmp olt (ppc_fp128 fpext (double 0x3C447AE147AE147B to ppc_fp128), ppc_fp128 mul (ppc_fp128 0xM00000000000000010000000000000000, ppc_fp128 0xM40140000000000000000000000000000)), ppc_fp128 mul (ppc_fp128 0xM00000000000000010000000000000000, ppc_fp128 0xM40140000000000000000000000000000), ppc_fp128 fpext (double 0x3C447AE147AE147B to ppc_fp128)) ; <i1> [#uses=1]
+ br i1 %0, label %bb4, label %bb5.split
+
+bb5.split: ; preds = %bb4
+ %1 = getelementptr double* null, i32 0 ; <double*> [#uses=0]
+ br label %bb4
+}