1 ; RUN: llc -verify-machineinstrs %s -mtriple=powerpc64-unknown-linux-gnu -O2 -o - -optimize-regalloc=false -regalloc=fast | FileCheck %s
3 declare void @func(ptr, i64, i64)
5 define void @test(ptr %context, ptr %elementArrayPtr, i32 %value) {
7 %cmp = icmp eq i32 %value, 0
8 br i1 %cmp, label %lreturn, label %lnext
11 %elementArray = load ptr, ptr %elementArrayPtr, align 8
12 ; CHECK: lwz [[LDREG:[0-9]+]], 140(1) # 4-byte Folded Reload
13 ; CHECK: # implicit-def: $x[[TEMPREG:[0-9]+]]
14 %element = load i32, ptr %elementArray, align 4
15 ; CHECK: mr [[TEMPREG]], [[LDREG]]
16 ; CHECK: clrldi 4, [[TEMPREG]], 32
17 %element.ext = zext i32 %element to i64
18 %value.ext = zext i32 %value to i64
19 call void @func(ptr %context, i64 %value.ext, i64 %element.ext)