1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
2 ; RUN: opt < %s -passes=memcpyopt,mldst-motion,newgvn -S | FileCheck %s
4 declare void @check(i8)
6 declare void @write(ptr %res)
9 ; CHECK-LABEL: define void @test1() {
10 ; CHECK-NEXT: [[TMP1:%.*]] = alloca [10 x i8], align 1
11 ; CHECK-NEXT: call void @write(ptr [[TMP1]])
12 ; CHECK-NEXT: [[TMP2:%.*]] = load i8, ptr [[TMP1]], align 1
13 ; CHECK-NEXT: call void @check(i8 [[TMP2]])
14 ; CHECK-NEXT: ret void
17 call void @write(ptr %1)
20 call void @check(i8 %2)