Files
clang-p2996/llvm/test/Verifier/llvm.fptrunc.round.ll
Julien Pages dcb2da13f1 [AMDGPU] Add a new intrinsic to control fp_trunc rounding mode
Add a new llvm.fptrunc.round intrinsic to precisely control
the rounding mode when converting from f32 to f16.

Differential Revision: https://reviews.llvm.org/D110579
2022-02-11 12:08:23 -05:00

14 lines
565 B
LLVM

; RUN: not opt -verify < %s 2>&1 | FileCheck %s
declare half @llvm.fptrunc.round(float, metadata)
define void @test_fptrunc_round_dynamic(float %a) {
; CHECK: unsupported rounding mode argument
%res = call half @llvm.fptrunc.round(float %a, metadata !"round.dynamic")
; CHECK: unsupported rounding mode argument
%res1 = call half @llvm.fptrunc.round(float %a, metadata !"round.test")
; CHECK: invalid value for llvm.fptrunc.round metadata operand (the operand should be a string)
%res2 = call half @llvm.fptrunc.round(float %a, metadata i32 5)
ret void
}