brintos

brintos / llvm-project-archived public Read only

0
0
Text · 692 B · 65357cc Raw
26 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -S -passes='require<globals-aa>,early-cse<memssa>' -earlycse-debug-hash | FileCheck %s3 4define i16 @f1() readonly {5  ret i16 06}7 8declare void @f2()9 10; Check that EarlyCSE correctly handles function calls that don't have11; a MemoryAccess.  In this case the calls to @f1 have no12; MemoryAccesses since globals-aa determines that @f1 doesn't13; read/write memory at all.14 15define void @f3() {16; CHECK-LABEL: @f3(17; CHECK-NEXT:    [[CALL1:%.*]] = call i16 @f1()18; CHECK-NEXT:    call void @f2()19; CHECK-NEXT:    ret void20;21  %call1 = call i16 @f1()22  call void @f2()23  %call2 = call i16 @f1()24  ret void25}26