1 ; RUN: opt -S -early-cse < %s | FileCheck %s
2 ; RUN: opt -S -basicaa -early-cse-memssa < %s | FileCheck %s
3 target datalayout = "E-m:e-i64:64-n32:64"
4 target triple = "powerpc64-unknown-linux-gnu"
6 ; Function Attrs: nounwind
7 define i64 @f(i64 %x) #0 {
9 %0 = call i64 @llvm.read_register.i64(metadata !0)
10 call void bitcast (void (...)* @foo to void ()*)()
11 %1 = call i64 @llvm.read_register.i64(metadata !0)
12 %add = add nsw i64 %0, %1
17 ; CHECK: call i64 @llvm.read_register.i64
18 ; CHECK: call i64 @llvm.read_register.i64
20 ; Function Attrs: nounwind readnone
21 declare i64 @llvm.read_register.i64(metadata) #1
23 ; Function Attrs: nounwind
24 declare void @llvm.write_register.i64(metadata, i64) #2
26 declare void @foo(...)
28 attributes #0 = { nounwind }
29 attributes #1 = { nounwind readnone }
30 attributes #2 = { nounwind }
32 !llvm.named.register.r1 = !{!0}