mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
32875af6e3
Summary: Currently fast-isel-abort will only abort for regular instructions, and just warn for function calls, terminators, function arguments. There is already fast-isel-abort-args but nothing for calls and terminators. This change turns the fast-isel-abort options into an integer option, so that multiple levels of strictness can be defined. This will help no being surprised when the "abort" option indeed does not abort, and enables the possibility to write test that verifies that no intrinsics are forgotten by fast-isel. Reviewers: resistor, echristo Subscribers: jfb, llvm-commits Differential Revision: http://reviews.llvm.org/D7941 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 230775
16 lines
580 B
LLVM
16 lines
580 B
LLVM
; RUN: llc -mtriple=aarch64-apple-darwin -fast-isel -fast-isel-abort=1 -verify-machineinstrs < %s | FileCheck %s
|
|
|
|
; Test that we don't segfault.
|
|
; CHECK-LABEL: test
|
|
; CHECK: ldr [[REG1:x[0-9]+]], [x1]
|
|
; CHECK-NEXT: and [[REG2:x[0-9]+]], x0, #0x7fffffffffffffff
|
|
; CHECK-NEXT: str [[REG1]], {{\[}}[[REG2]]{{\]}}
|
|
define void @test(i64 %a, i8* %b) {
|
|
%1 = and i64 %a, 9223372036854775807
|
|
%2 = inttoptr i64 %1 to i8*
|
|
call void @llvm.memcpy.p0i8.p0i8.i64(i8* %2, i8* %b, i64 8, i32 8, i1 false)
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.memcpy.p0i8.p0i8.i64(i8*, i8*, i64, i32, i1)
|