Files
clang-p2996/llvm/test/CodeGen/X86/pr24602.ll
Nikita Popov 2f448bf509 [X86] Migrate tests to use opaque pointers (NFC)
Test updates were performed using:
https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34

These are only the test updates where the test passed without
further modification (which is almost all of them, as the backend
is largely pointer-type agnostic).
2022-06-22 14:38:25 +02:00

18 lines
586 B
LLVM

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