mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
71cc6e9751
Only functions with floating-point return type accepts fast-math flags. When adding such flags to function returning integer, we'll see a crash, because there's still an undeleted value referencing the argument. This patch manually removes the temporary instruction when error occurs. Reviewed By: arsenm Differential Revision: https://reviews.llvm.org/D78355
11 lines
298 B
LLVM
11 lines
298 B
LLVM
; RUN: not llc < %s 2>&1 | FileCheck %s
|
|
|
|
; CHECK: error: fast-math-flags specified for call without floating-point scalar or vector return type
|
|
define i64 @test_lrintf(float %f) {
|
|
entry:
|
|
%0 = tail call fast i64 @llvm.lrint.i64.f32(float %f)
|
|
ret i64 %0
|
|
}
|
|
|
|
declare i64 @llvm.lrint.i64.f32(float)
|