brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 4dc59c5 Raw
28 lines · plain
1; RUN: opt -S -disable-output -passes="print<demanded-bits>" < %s 2>&1 | FileCheck %s2 3; CHECK-LABEL: Printing analysis 'Demanded Bits Analysis' for function 'test_mul':4; CHECK-DAG: DemandedBits: 0xff for   %1 = add nsw i32 %a, 55; CHECK-DAG: DemandedBits: 0xff for   %3 = trunc i32 %2 to i86; CHECK-DAG: DemandedBits: 0xff for   %2 = mul nsw i32 %1, %b7; CHECK-DAG: DemandedBits: 0x1 for   %4 = trunc i32 %2 to i18; CHECK-DAG: DemandedBits: 0xff for   %5 = zext i1 %4 to i89; CHECK-DAG: DemandedBits: 0xff for   %6 = add nsw i8 %3, %510; CHECK-DAG: DemandedBits: 0xff for %a in   %1 = add nsw i32 %a, 511; CHECK-DAG: DemandedBits: 0xff for 5 in   %1 = add nsw i32 %a, 512; CHECK-DAG: DemandedBits: 0xff for %1 in   %2 = mul nsw i32 %1, %b13; CHECK-DAG: DemandedBits: 0xff for %b in   %2 = mul nsw i32 %1, %b14; CHECK-DAG: DemandedBits: 0xff for %2 in   %3 = trunc i32 %2 to i815; CHECK-DAG: DemandedBits: 0x1 for %2 in   %4 = trunc i32 %2 to i116; CHECK-DAG: DemandedBits: 0x1 for %4 in   %5 = zext i1 %4 to i817; CHECK-DAG: DemandedBits: 0xff for %3 in   %6 = add nsw i8 %3, %518; CHECK-DAG: DemandedBits: 0xff for %5 in   %6 = add nsw i8 %3, %519define i8 @test_mul(i32 %a, i32 %b) {20  %1 = add nsw i32 %a, 521  %2 = mul nsw i32 %1, %b22  %3 = trunc i32 %2 to i823  %4 = trunc i32 %2 to i124  %5 = zext i1 %4 to i825  %6 = add nsw i8 %3, %526  ret i8 %627}28