From aecc22a7b8588d8a91e58aec21c3643b038faf5a Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 22 Oct 2008 04:53:16 +0000 Subject: 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 --- .../CBackend/2008-10-21-PPCLongDoubleConstant.ll | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test/CodeGen/CBackend/2008-10-21-PPCLongDoubleConstant.ll (limited to 'test/CodeGen/CBackend') 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,std::allocator > >", %"struct.std::vector >" } + %struct.Subscriptor = type { i32 (...)**, i32, %"struct.std::type_info"* } + %"struct.Tensor<1,0>" = type { [1 x double] } + %"struct.std::_Vector_base,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" } + %"struct.std::_Vector_base,std::allocator > >::_Vector_impl" = type { %"struct.Point<0>"*, %"struct.Point<0>"*, %"struct.Point<0>"* } + %"struct.std::_Vector_base >" = type { %"struct.std::_Vector_base >::_Vector_impl" } + %"struct.std::_Vector_base >::_Vector_impl" = type { double*, double*, double* } + %"struct.std::type_info" = type { i32 (...)**, i8* } + %"struct.std::vector,std::allocator > >" = type { %"struct.std::_Vector_base,std::allocator > >" } + %"struct.std::vector >" = type { %"struct.std::_Vector_base >" } + +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)) ; [#uses=1] + br i1 %0, label %bb4, label %bb5.split + +bb5.split: ; preds = %bb4 + %1 = getelementptr double* null, i32 0 ; [#uses=0] + br label %bb4 +} -- cgit v1.1