llvm.org GIT mirror llvm / release_60 test / Transforms / NewGVN / pr28562.ll
release_60

Tree @release_60 (Download .tar.gz)

pr28562.ll @release_60raw · history · blame

1
2
3
4
5
6
7
8
9
; RUN: opt -S -newgvn < %s | FileCheck %s
define i32* @test1(i32* %a) {
  %x1 = getelementptr inbounds i32, i32* %a, i32 10
  %x2 = getelementptr i32, i32* %a, i32 10
  ret i32* %x2
; CHECK-LABEL: @test1(
; CHECK: %[[x:.*]] = getelementptr i32, i32* %a, i32 10
; CHECK: ret i32* %[[x]]
}