File: pr40509.ll

package info (click to toggle)
llvm-toolchain-16 1%3A16.0.6-15~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,634,792 kB
  • sloc: cpp: 6,179,261; ansic: 1,216,205; asm: 741,319; python: 196,614; objc: 75,325; f90: 49,640; lisp: 32,396; pascal: 12,286; sh: 9,394; perl: 7,442; ml: 5,494; awk: 3,523; makefile: 2,723; javascript: 1,206; xml: 886; fortran: 581; cs: 573
file content (54 lines) | stat: -rw-r--r-- 1,958 bytes parent folder | download | duplicates (12)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
; REQUIRES: asserts
; RUN: opt -mtriple=systemz-unknown -mcpu=z13 -O3 -disable-output %s

; During transform to LCSSA, an access becomes obfuscated to:
; (2 = phi (phi(val), val)), which BasicAA fails to analyze.
; It's currently hard coded in BasicAA to return MayAlias for nested phis.
; This leads MemorySSA to finding a new (false) clobber for a previously
; optimized access. With verifyClobber included in verifyMemorySSA, such a
; transformation will cause MemorySSA verification to fail.
; If the verifyClobber is re-enabled, this test will crash.

target datalayout = "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64"
target triple = "s390x-ibm-linux"

%0 = type <{ i64, i8, i64, i16 }>

@g_54 = external dso_local global i16, align 2
@g_101 = external dso_local global <{ i64, i8, i64, i8, i8 }>, align 2

declare dso_local void @safe_lshift_func_int16_t_s_s()
declare dso_local i8 @safe_div_func_int8_t_s_s()

define dso_local void @func_47(ptr %arg) {
bb:
  %tmp = alloca i32, align 4
  br label %bb1

bb1:                                              ; preds = %bb12, %bb
  %tmp2 = getelementptr inbounds %0, ptr %arg, i32 0, i32 3
  store i16 undef, ptr %tmp2, align 1
  %tmp3 = call signext i8 @safe_div_func_int8_t_s_s()
  %tmp7 = icmp ne i8 %tmp3, 0
  br i1 %tmp7, label %bb8, label %bb10

bb8:                                              ; preds = %bb1
  %tmp9 = icmp eq i32 0, 0
  br i1 %tmp9, label %bb12, label %bb13

bb10:                                             ; preds = %bb10, %bb1
  call void @safe_lshift_func_int16_t_s_s()
  %tmp11 = getelementptr inbounds %0, ptr %arg, i32 0, i32 3
  store i16 0, ptr %tmp11, align 1
  store i8 0, ptr getelementptr inbounds (%0, ptr @g_101, i32 0, i32 1), align 2
  br label %bb10

bb12:                                             ; preds = %bb8
  store i16 0, ptr @g_54, align 2
  br label %bb1

bb13:                                             ; preds = %bb8
  ret void
}