File: ppcf128-no-fold.ll

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (36 lines) | stat: -rw-r--r-- 1,481 bytes parent folder | download | duplicates (15)
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
; RUN: opt < %s -sroa -S | FileCheck %s 
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"

%struct.ld2 = type { [2 x ppc_fp128] }
declare void @bar(i8*, [2 x i128])

define void @foo(i8* %v) #0 {
entry:
  %v.addr = alloca i8*, align 8
  %z = alloca %struct.ld2, align 16
  store i8* %v, i8** %v.addr, align 8
  %dat = getelementptr inbounds %struct.ld2, %struct.ld2* %z, i32 0, i32 0
  %arrayidx = getelementptr inbounds [2 x ppc_fp128], [2 x ppc_fp128]* %dat, i32 0, i64 0
  store ppc_fp128 0xM403B0000000000000000000000000000, ppc_fp128* %arrayidx, align 16
  %dat1 = getelementptr inbounds %struct.ld2, %struct.ld2* %z, i32 0, i32 0
  %arrayidx2 = getelementptr inbounds [2 x ppc_fp128], [2 x ppc_fp128]* %dat1, i32 0, i64 1
  store ppc_fp128 0xM4093B400000000000000000000000000, ppc_fp128* %arrayidx2, align 16
  %0 = load i8*, i8** %v.addr, align 8
  %coerce.dive = getelementptr %struct.ld2, %struct.ld2* %z, i32 0, i32 0
  %1 = bitcast [2 x ppc_fp128]* %coerce.dive to [2 x i128]*
  %2 = load [2 x i128], [2 x i128]* %1, align 1
  call void @bar(i8* %0, [2 x i128] %2)
  ret void
}

; CHECK-LABEL: @foo
; CHECK-NOT: i128 4628293042053316608
; CHECK-NOT: i128 4653260752096854016
; CHECK-DAG: i128 bitcast (ppc_fp128 0xM403B0000000000000000000000000000 to i128)
; CHECK-DAG: i128 bitcast (ppc_fp128 0xM4093B400000000000000000000000000 to i128)
; CHECK: call void @bar(i8* %v, [2 x i128]
; CHECK: ret void

attributes #0 = { nounwind }