aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/Transforms/GVN/bitcast-of-call.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/GVN/bitcast-of-call.ll')
-rw-r--r--llvm/test/Transforms/GVN/bitcast-of-call.ll17
1 files changed, 12 insertions, 5 deletions
diff --git a/llvm/test/Transforms/GVN/bitcast-of-call.ll b/llvm/test/Transforms/GVN/bitcast-of-call.ll
index 6c4e8d2..3f40085 100644
--- a/llvm/test/Transforms/GVN/bitcast-of-call.ll
+++ b/llvm/test/Transforms/GVN/bitcast-of-call.ll
@@ -1,13 +1,20 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
; RUN: opt < %s -passes=gvn -S | FileCheck %s
+
; PR2213
define ptr @f(ptr %x) {
+; CHECK-LABEL: define ptr @f(
+; CHECK-SAME: ptr [[X:%.*]]) {
+; CHECK-NEXT: [[ENTRY:.*:]]
+; CHECK-NEXT: [[TMP:%.*]] = call ptr @m(i32 12)
+; CHECK-NEXT: ret ptr [[TMP]]
+;
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
+ %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]
+ ret ptr %tmp2
}
declare ptr @m(i32)