summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/pr39177.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/InstCombine/pr39177.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/pr39177.ll13
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/test/Transforms/InstCombine/pr39177.ll b/llvm/test/Transforms/InstCombine/pr39177.ll
index a047a079f58..35c5ce0d3f6 100644
--- a/llvm/test/Transforms/InstCombine/pr39177.ll
+++ b/llvm/test/Transforms/InstCombine/pr39177.ll
@@ -1,4 +1,5 @@
-; RUN: opt < %s -instcombine -S
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt < %s -instcombine -S | FileCheck %s
%struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i64, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i8*, i8*, i64, i32, [20 x i8] }
%struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 }
@@ -9,6 +10,10 @@
@fwrite = alias i64 (i8*, i64, i64, %struct._IO_FILE*), i64 (i8*, i64, i64, %struct._IO_FILE*)* @__fwrite_alias
define i64 @__fwrite_alias(i8* %ptr, i64 %size, i64 %n, %struct._IO_FILE* %s) {
+; CHECK-LABEL: @__fwrite_alias(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: ret i64 0
+;
entry:
%ptr.addr = alloca i8*, align 8
%size.addr = alloca i64, align 8
@@ -22,6 +27,12 @@ entry:
}
define void @foo() {
+; CHECK-LABEL: @foo(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[TMP0:%.*]] = load %struct._IO_FILE*, %struct._IO_FILE** @stderr, align 8
+; CHECK-NEXT: [[TMP1:%.*]] = call i64 @__fwrite_alias(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 7, i64 1, %struct._IO_FILE* [[TMP0]])
+; CHECK-NEXT: ret void
+;
entry:
%retval = alloca i32, align 4
store i32 0, i32* %retval, align 4
OpenPOWER on IntegriCloud