brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · eedd7aa Raw
31 lines · plain
1; RUN: llvm-as %s -o - | llvm-dis -o - | FileCheck %s2 3%0 = type { %1, %1, %1, %1, %1, %1, %1, %1 }4%1 = type { %2, %2, %2, %2, %2, %2, %2, %2 }5%2 = type { %3, %3, %3, %3, %3, %3, %3, %3 }6%3 = type { %4, %4, %4, %4, %4, %4, %4, %4 }7%4 = type { %5, %5, %5, %5, %5, %5, %5, %5 }8%5 = type { %6, %6, %6, %6, %6, %6, %6, %6 }9%6 = type { %7, %7, %7, %7, %7, %7, %7, %7 }10%7 = type { %8, %8, %8, %8, %8, %8, %8, %8 }11%8 = type { %9, %9, %9, %9, %9, %9, %9, %9 }12%9 = type { %10, %10, %10, %10, %10, %10, %10, %10 }13%10 = type { %11, %11, %11, %11, %11, %11, %11, %11 }14%11 = type { %12, %12, %12, %12, %12, %12, %12, %12 }15%12 = type { %13, %13, %13, %13, %13, %13, %13, %13 }16%13 = type { i32, i32 }17 18; it would take a naive recursive implementation ~4 days19; to constant fold the size of %020define i64 @f_i64() {21; CHECK-LABEL: @f_i6422; CHECK:         ret i64 ptrtoint (ptr getelementptr (%0, ptr null, i32 1) to i64)23  ret i64 ptrtoint (ptr getelementptr (%0, ptr null, i32 1) to i64)24}25 26define i32 @f_i32() {27; CHECK-LABEL: @f_i3228; CHECK:         ret i32 ptrtoint (ptr getelementptr (%3, ptr null, i32 1) to i32)29  ret i32 ptrtoint (ptr getelementptr (%3, ptr null, i32 1) to i32)30}31