1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
3 ; PR24602: Make sure we don't barf on non-foldable code (with opaque constants).
5 ; CHECK-LABEL: pr24602:
7 ; CHECK-NEXT: movabsq $-10000000000, [[CST:%[a-z0-9]+]]
8 ; CHECK-NEXT: imulq [[CST]], %rsi
9 ; CHECK-NEXT: leaq (%rdi,%rsi,8), %rax
10 ; CHECK-NEXT: movq [[CST]], (%rdi,%rsi,8)
12 define ptr @pr24602(ptr %p, i64 %n) nounwind {
13 %mul = mul nsw i64 %n, -10000000000
14 %add.ptr = getelementptr inbounds i64, ptr %p, i64 %mul
15 store i64 -10000000000, ptr %add.ptr