summaryrefslogtreecommitdiff
path: root/polly/test/CodeGen/invariant_loads_from_struct_with_different_types_2.ll
blob: 6312e399e255e9327c517ff60ee2176afbf9b4af (plain)
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
; RUN: opt %loadPolly -polly-codegen -polly-invariant-load-hoisting=true < %s
;
; Check we do not crash even though we pre-load values with different types
; from the same base pointer.
;
target datalayout = "e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128"

%struct.FFIIRFilterCoeffs.0.3.6.63.78.81.87.102.150.162.165.168.171 = type { i32, float, i32*, float* }

; Function Attrs: nounwind ssp
define void @butterworth_init_coeffs(%struct.FFIIRFilterCoeffs.0.3.6.63.78.81.87.102.150.162.165.168.171* %c) #0 {
entry:
  br i1 undef, label %if.end, label %if.then

if.then:                                          ; preds = %entry
  unreachable

if.end:                                           ; preds = %entry
  br i1 undef, label %if.end.2, label %if.then.1

if.then.1:                                        ; preds = %if.end
  br label %return

if.end.2:                                         ; preds = %if.end
  br i1 undef, label %for.body.35, label %for.end.126

for.body.35:                                      ; preds = %if.end.2
  unreachable

for.end.126:                                      ; preds = %if.end.2
  %gain = getelementptr inbounds %struct.FFIIRFilterCoeffs.0.3.6.63.78.81.87.102.150.162.165.168.171, %struct.FFIIRFilterCoeffs.0.3.6.63.78.81.87.102.150.162.165.168.171* %c, i32 0, i32 1
  br i1 undef, label %for.body.133, label %for.end.169

for.body.133:                                     ; preds = %for.body.133, %for.end.126
  store float undef, float* %gain, align 4
  %cy = getelementptr inbounds %struct.FFIIRFilterCoeffs.0.3.6.63.78.81.87.102.150.162.165.168.171, %struct.FFIIRFilterCoeffs.0.3.6.63.78.81.87.102.150.162.165.168.171* %c, i32 0, i32 3
  %0 = load float*, float** %cy, align 4
  br i1 false, label %for.body.133, label %for.end.169

for.end.169:                                      ; preds = %for.body.133, %for.end.126
  br label %return

return:                                           ; preds = %for.end.169, %if.then.1
  ret void
}