1 ; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux-gnu -fast-isel -O0 < %s | FileCheck %s
3 ; The second fctiwz would use an incorrect input register due to wrong handling
4 ; of COPY_TO_REGCLASS in the FastISel pass. Verify that this is fixed.
6 declare void @func(i32, i32)
12 ; CHECK: lfs [[REG:[0-9]+]],
13 ; CHECK: fctiwz {{[0-9]+}}, [[REG]]
17 %memPos = alloca float, align 4
18 store float 1.500000e+01, ptr %memPos
19 %valPos = load float, ptr %memPos
21 %memNeg = alloca float, align 4
22 store float -1.500000e+01, ptr %memNeg
23 %valNeg = load float, ptr %memNeg
25 %FloatToIntPos = fptosi float %valPos to i32
26 call void @func(i32 15, i32 %FloatToIntPos)
28 %FloatToIntNeg = fptosi float %valNeg to i32
29 call void @func(i32 -15, i32 %FloatToIntNeg)