• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -O0 -mtriple=x86_64-linux-gnu -global-isel -global-isel-abort=2 -pass-remarks-missed='gisel*' -verify-machineinstrs %s -o %t.out 2> %t.err
2; RUN: FileCheck %s --check-prefix=FALLBACK-WITH-REPORT-OUT < %t.out
3; RUN: FileCheck %s --check-prefix=FALLBACK-WITH-REPORT-ERR < %t.err
4; This file checks that the fallback path to selection dag works.
5; The test is fragile in the sense that it must be updated to expose
6; something that fails with global-isel.
7; When we cannot produce a test case anymore, that means we can remove
8; the fallback path.
9
10; Check that we fallback on invoke translation failures.
11; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to legalize instruction: %1:_(s80) = G_FCONSTANT x86_fp80 0xK4002A000000000000000
12; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for test_x86_fp80_dump
13; FALLBACK-WITH-REPORT-OUT-LABEL: test_x86_fp80_dump:
14define void @test_x86_fp80_dump(x86_fp80* %ptr){
15  store x86_fp80 0xK4002A000000000000000, x86_fp80* %ptr, align 16
16  ret void
17}
18
19; Check that we fallback on byVal argument
20; FALLBACK-WITH-REPORT-ERR: remark: <unknown>:0:0: unable to translate instruction: call: '  call void @ScaleObjectOverwrite_3(%struct.PointListStruct* %index, %struct.PointListStruct* byval(%struct.PointListStruct) %index)' (in function: ScaleObjectOverwrite_2)
21; FALLBACK-WITH-REPORT-ERR: warning: Instruction selection used fallback path for ScaleObjectOverwrite_2
22; FALLBACK-WITH-REPORT-OUT-LABEL: ScaleObjectOverwrite_2:
23%struct.PointListStruct = type { i8*, i8* }
24declare void @ScaleObjectOverwrite_3(%struct.PointListStruct* %index, %struct.PointListStruct* byval(%struct.PointListStruct) %index2)
25define void @ScaleObjectOverwrite_2(%struct.PointListStruct* %index) {
26entry:
27  call void @ScaleObjectOverwrite_3(%struct.PointListStruct* %index, %struct.PointListStruct* byval(%struct.PointListStruct) %index)
28  ret void
29}
30