diff --git a/llvm/test/tools/llvm-as/slow-ptrtoint.ll b/llvm/test/tools/llvm-as/slow-ptrtoint.ll --- a/llvm/test/tools/llvm-as/slow-ptrtoint.ll +++ b/llvm/test/tools/llvm-as/slow-ptrtoint.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as %s -o - +; RUN: llvm-as %s -o - | llvm-dis -o - | FileCheck %s %0 = type { %1, %1, %1, %1, %1, %1, %1, %1 } %1 = type { %2, %2, %2, %2, %2, %2, %2, %2 } @@ -15,12 +15,16 @@ %12 = type { %13, %13, %13, %13, %13, %13, %13, %13 } %13 = type { i32, i32 } -define i64 @f() { - ; it would take a naive recursive implementation ~4 days - ; to constant fold the size +; it would take a naive recursive implementation ~4 days +; to constant fold the size of %0 +define i64 @f_i64() { +; CHECK-LABEL: @f_i64 +; CHECK: ret i64 mul (i64 ptrtoint (i32* getelementptr (i32, i32* null, i32 1) to i64), i64 1099511627776) ret i64 ptrtoint (%0* getelementptr (%0, %0* null, i32 1) to i64) } -define i32 @f2() { - ret i32 ptrtoint (%0* getelementptr (%0, %0* null, i32 1) to i32) +define i32 @f_i32() { +; CHECK-LABEL: @f_i32 +; CHECK: ret i32 mul (i32 ptrtoint (i32* getelementptr (i32, i32* null, i32 1) to i32), i32 -2147483648) + ret i32 ptrtoint (%3* getelementptr (%3, %3* null, i32 1) to i32) }