• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
2; RUN: -mtriple=powerpc-ibm-aix-xcoff 2>&1 | FileCheck %s
3
4; RUN: llc -verify-machineinstrs < %s -mcpu=pwr4 -mattr=-altivec \
5; RUN: -mtriple=powerpc-unknown-linux-gnu 2>&1 | FileCheck %s
6
7; When we convert an `i64` to `f32` on 32-bit PPC target, a `setcc` will be
8; generated. And this testcase verifies that the operand expansion of `setcc`
9; will not crash.
10
11%struct.A = type { float }
12
13@ll = external local_unnamed_addr global i64
14@a = external local_unnamed_addr global %struct.A
15
16define void @foo() local_unnamed_addr {
17entry:
18  %0 = load i64, i64* @ll
19  %conv = sitofp i64 %0 to float
20  store float %conv, float* getelementptr inbounds (%struct.A, %struct.A* @a, i32 0, i32 0)
21  ret void
22}
23
24; CHECK-NOT: Unexpected setcc expansion!
25