1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -S < %s -passes=early-cse -earlycse-debug-hash | FileCheck %s
4 ; Store-to-load forwarding across a @llvm.experimental.noalias.scope.decl.
6 define float @s2l(ptr %p) {
8 ; CHECK-NEXT: store float 0.000000e+00, ptr [[P:%.*]], align 4
9 ; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !0)
10 ; CHECK-NEXT: ret float 0.000000e+00
12 store float 0.0, ptr %p
13 call void @llvm.experimental.noalias.scope.decl(metadata !0)
14 %t = load float, ptr %p
18 ; Redundant load elimination across a @llvm.experimental.noalias.scope.decl.
20 define float @rle(ptr %p) {
22 ; CHECK-NEXT: [[R:%.*]] = load float, ptr [[P:%.*]], align 4
23 ; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !0)
24 ; CHECK-NEXT: [[T:%.*]] = fadd float [[R]], [[R]]
25 ; CHECK-NEXT: ret float [[T]]
27 %r = load float, ptr %p
28 call void @llvm.experimental.noalias.scope.decl(metadata !0)
29 %s = load float, ptr %p
30 %t = fadd float %r, %s
34 declare void @llvm.experimental.noalias.scope.decl(metadata)
37 !1 = distinct !{ !1, !2 }