[X86] Add test case for report_fatal_error added in r352699.

r352699 replaced an llvm_unreachable with a report_fatal_error. This patch adds a test case for it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353096 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper
2019-02-04 21:24:15 +00:00
parent 7ef4c67822
commit 823117bf13
@@ -0,0 +1,11 @@
;RUN: not llc < %s -mtriple=i686-unknown-unknown -mattr=sse2 2>&1 | FileCheck %s --check-prefix=CHECK
; Make sure we generate fatal error from the type legalizer for using a 64-bit
; mode intrinsics in 32-bit mode. We used to use an llvm_unreachable.
; CHECK: LLVM ERROR: Do not know how to expand the result of this operator!
define i64 @test_x86_sse2_cvtsd2si64(<2 x double> %a0) {
%res = call i64 @llvm.x86.sse2.cvtsd2si64(<2 x double> %a0) ; <i64> [#uses=1]
ret i64 %res
}
declare i64 @llvm.x86.sse2.cvtsd2si64(<2 x double>) nounwind readnone