1; RUN: opt %loadPolly -polly-codegen -S < %s | FileCheck %s
2;
3; Scalar write of bitcasted value. Instead of writing %b of type
4; %structty, the SCEV expression looks through the bitcast such that
5; SCEVExpander returns %add.ptr81.i of type i8* to be the new value
6; of %b.
7;
8target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9
10%structty = type { %structty*, %structty*, i32, [2 x i64] }
11
12define void @bitmap_set_range() {
13entry:
14  %a = ptrtoint i8* undef to i64
15  br label %cond.end32.i
16
17cond.end32.i:
18  br i1 false, label %cond.true67.i, label %cond.end73.i
19
20cond.true67.i:
21  br label %cond.end73.i
22
23cond.end73.i:
24  %add.ptr81.i = getelementptr inbounds i8, i8* null, i64 %a
25  %b = bitcast i8* %add.ptr81.i to %structty*
26  br label %bitmap_element_allocate.exit
27
28bitmap_element_allocate.exit:
29  %tobool43 = icmp eq %structty* %b, null
30  ret void
31}
32
33
34; CHECK:       polly.stmt.cond.end73.i:
35; CHECK-NEXT:   %0 = bitcast %structty** %b.s2a to i8**
36; CHECK-NEXT:   store i8* undef, i8** %0
37; CHECK-NEXT:   br label %polly.exiting
38