blob: 6355c4557ef9899efe4356abab72129881048fde [file] [log] [blame]
Dan Gohman2c74fe92017-11-08 21:59:51 +00001; RUN: opt -S < %s -instcombine | FileCheck %s
2
3declare void @llvm.sideeffect()
4
5; Store-to-load forwarding across a @llvm.sideeffect.
6
7; CHECK-LABEL: s2l
8; CHECK-NOT: load
9define float @s2l(float* %p) {
10 store float 0.0, float* %p
11 call void @llvm.sideeffect()
12 %t = load float, float* %p
13 ret float %t
14}