brintos

brintos / llvm-project-archived public Read only

0
0
Text · 826 B · ea8a54c Raw
29 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt -passes=gvn -S %s | FileCheck %s3;4;Check that !noundef metadata is combined.5define i32 @one_noundef(ptr %p) {6; CHECK-LABEL: @one_noundef(7; CHECK-NEXT:    [[A:%.*]] = load i32, ptr [[P:%.*]], align 4, !noundef !08; CHECK-NEXT:    [[C:%.*]] = add i32 [[A]], [[A]]9; CHECK-NEXT:    ret i32 [[C]]10;11  %a = load i32, ptr %p, !noundef !012  %b = load i32, ptr %p13  %c = add i32 %a, %b14  ret i32 %c15}16 17define i32 @both_noundef(ptr %p) {18; CHECK-LABEL: @both_noundef(19; CHECK-NEXT:    [[A:%.*]] = load i32, ptr [[P:%.*]], align 4, !noundef !020; CHECK-NEXT:    [[C:%.*]] = add i32 [[A]], [[A]]21; CHECK-NEXT:    ret i32 [[C]]22;23  %a = load i32, ptr %p, !noundef !024  %b = load i32, ptr %p, !noundef !025  %c = add i32 %a, %b26  ret i32 %c27}28!0 = !{}29