brintos

brintos / llvm-project-archived public Read only

0
0
Text · 895 B · 4c69d94 Raw
34 lines · plain
1; RUN: llc -verify-machineinstrs -mtriple powerpc64-unknown-linux-gnu -fast-isel -O0 < %s | FileCheck %s2 3; The second fctiwz would use an incorrect input register due to wrong handling4; of COPY_TO_REGCLASS in the FastISel pass.  Verify that this is fixed.5 6declare void @func(i32, i32)7 8define void @test() {9; CHECK-LABEL: test:10; CHECK: bl func11; CHECK-NEXT: nop12; CHECK: lfs [[REG:[0-9]+]], 13; CHECK: fctiwz {{[0-9]+}}, [[REG]]14; CHECK: bl func15; CHECK-NEXT: nop16 17  %memPos = alloca float, align 418  store float 1.500000e+01, ptr %memPos19  %valPos = load float, ptr %memPos20 21  %memNeg = alloca float, align 422  store float -1.500000e+01, ptr %memNeg23  %valNeg = load float, ptr %memNeg24 25  %FloatToIntPos = fptosi float %valPos to i3226  call void @func(i32 15, i32 %FloatToIntPos)27 28  %FloatToIntNeg = fptosi float %valNeg to i3229  call void @func(i32 -15, i32 %FloatToIntNeg)30 31  ret void32}33 34