File: pr16556-2.ll

package info (click to toggle)
llvm-toolchain-20 1%3A20.1.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 2,111,304 kB
  • sloc: cpp: 7,438,677; ansic: 1,393,822; asm: 1,012,926; python: 241,650; f90: 86,635; objc: 75,479; lisp: 42,144; pascal: 17,286; sh: 10,027; ml: 5,082; perl: 4,730; awk: 3,523; makefile: 3,349; javascript: 2,251; xml: 892; fortran: 672
file content (40 lines) | stat: -rw-r--r-- 1,616 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
; RUN: llc -verify-machineinstrs < %s

; This test formerly failed because of wrong custom lowering for
; fptosi of ppc_fp128.

target 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"
target triple = "powerpc-unknown-linux-gnu"

%core.time.TickDuration = type { i64 }

@_D4core4time12TickDuration11ticksPerSecyl = global i64 0
@.str5 = internal unnamed_addr constant [40 x i8] c"..\5Cldc\5Cruntime\5Cdruntime\5Csrc\5Ccore\5Ctime.d\00"
@.str83 = internal constant [10 x i8] c"null this\00"
@.modulefilename = internal constant { i32, ptr } { i32 39, ptr @.str5 }

declare ptr @_d_assert_msg({ i32, ptr }, { i32, ptr }, i32)


define weak_odr fastcc i64 @_D4core4time12TickDuration30__T2toVAyaa7_7365636f6e6473TlZ2toMxFNaNbNfZl(ptr %.this_arg) {
entry:
  %unitsPerSec = alloca i64, align 8
  %tmp = icmp ne ptr %.this_arg, null
  br i1 %tmp, label %noassert, label %assert

assert:                                           ; preds = %entry
  %tmp1 = load { i32, ptr }, ptr @.modulefilename
  %0 = call ptr @_d_assert_msg({ i32, ptr } { i32 9, ptr @.str83 }, { i32, ptr } %tmp1, i32 1586)
  unreachable

noassert:                                         ; preds = %entry
  %tmp3 = load i64, ptr %.this_arg
  %tmp4 = sitofp i64 %tmp3 to ppc_fp128
  %tmp5 = load i64, ptr @_D4core4time12TickDuration11ticksPerSecyl
  %tmp6 = sitofp i64 %tmp5 to ppc_fp128
  %tmp7 = fdiv ppc_fp128 %tmp6, 0xM80000000000000000000000000000000
  %tmp8 = fdiv ppc_fp128 %tmp4, %tmp7
  %tmp9 = fptosi ppc_fp128 %tmp8 to i64
  ret i64 %tmp9
}