1 ; RUN: llc -mcpu=generic -mtriple=powerpc64le-unknown-unknown -O0 < %s \
2 ; RUN: -verify-machineinstrs | FileCheck %s --check-prefix=GENERIC
3 ; RUN: llc -mcpu=ppc -mtriple=powerpc64le-unknown-unknown -O0 < %s \
4 ; RUN: -verify-machineinstrs | FileCheck %s
6 define i32 @bad(double %x) {
7 %1 = fptoui double %x to i32
10 ; CHECK: fctidz [[REG0:[0-9]+]], 1
11 ; CHECK: stfd [[REG0]], [[OFF:.*]](1)
12 ; CHECK: lwz {{[0-9]*}}, [[OFF]](1)
13 ; GENERIC: xscvdpuxws [[REG0:[0-9]+]], 1
14 ; GENERIC: mffprwz {{[0-9]*}}, [[REG0]]
17 define i32 @bad1(float %x) {
19 %0 = fptosi float %x to i32
22 ; CHECK: fctiwz [[REG0:[0-9]+]], 1
23 ; CHECK: stfd [[REG0]], [[OFF:.*]](1)
24 ; CHECK: lwa {{[0-9]*}}, [[OFF]](1)
25 ; GENERIC: xscvdpsxws [[REG0:[0-9]+]], 1
26 ; GENERIC: mffprwz {{[0-9]*}}, [[REG0]]