brintos

brintos / llvm-project-archived public Read only

0
0
Text · 716 B · c16f5f6 Raw
19 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -S -passes=dse < %s | FileCheck %s3 4; malloc should have i64 argument under default data layout5declare noalias ptr @malloc(i32)6 7define ptr @malloc_and_memset_intrinsic(i32 %n) {8; CHECK-LABEL: @malloc_and_memset_intrinsic(9; CHECK-NEXT:    [[CALL:%.*]] = call ptr @malloc(i32 [[N:%.*]])10; CHECK-NEXT:    call void @llvm.memset.p0.i32(ptr align 1 [[CALL]], i8 0, i32 [[N]], i1 false)11; CHECK-NEXT:    ret ptr [[CALL]]12;13  %call = call ptr @malloc(i32 %n)14  call void @llvm.memset.p0.i32(ptr align 1 %call, i8 0, i32 %n, i1 false)15  ret ptr %call16}17 18declare void @llvm.memset.p0.i32(ptr nocapture writeonly, i8, i32, i1 immarg) #219