brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 8f871ca Raw
41 lines · plain
1; RUN: llc -verify-machineinstrs < %s2 3; This test formerly failed because of wrong custom lowering for4; fptosi of ppc_fp128.5 6target datalayout = "E-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:64:128-v64:64:64-v128:128:128-a0:0:64-n32"7target triple = "powerpc-unknown-linux-gnu"8 9%core.time.TickDuration = type { i64 }10 11@_D4core4time12TickDuration11ticksPerSecyl = global i64 012@.str5 = internal unnamed_addr constant [40 x i8] c"..\5Cldc\5Cruntime\5Cdruntime\5Csrc\5Ccore\5Ctime.d\00"13@.str83 = internal constant [10 x i8] c"null this\00"14@.modulefilename = internal constant { i32, ptr } { i32 39, ptr @.str5 }15 16declare ptr @_d_assert_msg({ i32, ptr }, { i32, ptr }, i32)17 18 19define weak_odr fastcc i64 @_D4core4time12TickDuration30__T2toVAyaa7_7365636f6e6473TlZ2toMxFNaNbNfZl(ptr %.this_arg) {20entry:21  %unitsPerSec = alloca i64, align 822  %tmp = icmp ne ptr %.this_arg, null23  br i1 %tmp, label %noassert, label %assert24 25assert:                                           ; preds = %entry26  %tmp1 = load { i32, ptr }, ptr @.modulefilename27  %0 = call ptr @_d_assert_msg({ i32, ptr } { i32 9, ptr @.str83 }, { i32, ptr } %tmp1, i32 1586)28  unreachable29 30noassert:                                         ; preds = %entry31  %tmp3 = load i64, ptr %.this_arg32  %tmp4 = sitofp i64 %tmp3 to ppc_fp12833  %tmp5 = load i64, ptr @_D4core4time12TickDuration11ticksPerSecyl34  %tmp6 = sitofp i64 %tmp5 to ppc_fp12835  %tmp7 = fdiv ppc_fp128 %tmp6, 0xM8000000000000000000000000000000036  %tmp8 = fdiv ppc_fp128 %tmp4, %tmp737  %tmp9 = fptosi ppc_fp128 %tmp8 to i6438  ret i64 %tmp939}40 41