1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefixes=X64
5 define void @test_gep_i64c(ptr %addr) {
6 %arrayidx = getelementptr i32, ptr undef, i64 5
9 define void @test_gep_i64(ptr %addr, i64 %ofs) {
10 %arrayidx = getelementptr i32, ptr undef, i64 %ofs
23 ; X64-LABEL: name: test_gep_i64c
24 ; X64: [[DEF:%[0-9]+]]:_(p0) = IMPLICIT_DEF
25 ; X64-NEXT: [[C:%[0-9]+]]:_(s64) = G_CONSTANT i64 20
26 ; X64-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[DEF]], [[C]](s64)
27 ; X64-NEXT: G_STORE [[PTR_ADD]](p0), [[DEF]](p0) :: (store (p0) into %ir.addr)
30 %1(s64) = G_CONSTANT i64 20
31 %2(p0) = G_PTR_ADD %0, %1(s64)
32 G_STORE %2, %0 :: (store (p0) into %ir.addr)
44 ; X64-LABEL: name: test_gep_i64
45 ; X64: [[DEF:%[0-9]+]]:_(p0) = IMPLICIT_DEF
46 ; X64-NEXT: [[DEF1:%[0-9]+]]:_(s64) = IMPLICIT_DEF
47 ; X64-NEXT: [[PTR_ADD:%[0-9]+]]:_(p0) = G_PTR_ADD [[DEF]], [[DEF1]](s64)
48 ; X64-NEXT: G_STORE [[PTR_ADD]](p0), [[DEF]](p0) :: (store (p0) into %ir.addr)
51 %1(s64) = IMPLICIT_DEF
52 %2(p0) = G_PTR_ADD %0, %1(s64)
53 G_STORE %2, %0 :: (store (p0) into %ir.addr)