blob: 338200af621fa8dbe5a9b2c6a27467f7bf2c779b [file] [log] [blame]
; RUN: opt -S -passes=gvn < %s | FileCheck %s
define ptr @test1(ptr %a) {
%x1 = getelementptr inbounds i32, ptr %a, i32 10
%x2 = getelementptr i32, ptr %a, i32 10
ret ptr %x2
; CHECK-LABEL: @test1(
; CHECK: %[[x:.*]] = getelementptr i32, ptr %a, i32 10
; CHECK: ret ptr %[[x]]
}