brintos

brintos / llvm-project-archived public Read only

0
0
Text · 612 B · f5b0d7c Raw
22 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 62; RUN: opt < %s -passes=gvn,instcombine -S | FileCheck %s3 4; PR41895@G = external constant [4 x i32]6 7define i32 @test(ptr %p, i32 %i) nounwind {8; CHECK-LABEL: define i32 @test(9; CHECK-SAME: ptr [[P:%.*]], i32 [[I:%.*]]) #[[ATTR0:[0-9]+]] {10; CHECK-NEXT:  [[ENTRY:.*:]]11; CHECK-NEXT:    store i8 4, ptr [[P]], align 112; CHECK-NEXT:    ret i32 013;14entry:15  %P = getelementptr [4 x i32], ptr @G, i32 0, i32 %i16  %A = load i32, ptr %P17  store i8 4, ptr %p18  %B = load i32, ptr %P19  %C = sub i32 %A, %B20  ret i32 %C21}22