bolt/deps/llvm-18.1.8/llvm/test/Transforms/GVN/bitcast-of-call.ll

14 lines
363 B
LLVM
Raw Normal View History

2025-02-14 19:21:04 +01:00
; RUN: opt < %s -passes=gvn -S | FileCheck %s
; PR2213
define ptr @f(ptr %x) {
entry:
%tmp = call ptr @m( i32 12 ) ; <ptr> [#uses=2]
%tmp1 = bitcast ptr %tmp to ptr ; <ptr> [#uses=0]
%tmp2 = bitcast ptr %tmp to ptr ; <ptr> [#uses=0]
; CHECK-NOT: %tmp2
ret ptr %tmp2
}
declare ptr @m(i32)