[llvm] [WIP][AMDGPU] Split `isInlinableLiteral16` into three and call the specific version if possible (PR #81345)
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 13:32:22 PST 2024
================
@@ -99,39 +99,39 @@ define i32 @inline_A_constraint_H1() {
; VI-LABEL: {{^}}inline_A_constraint_H2:
; VI: v_mov_b32 {{v[0-9]+}}, 0x3c00
define i32 @inline_A_constraint_H2() {
- %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(i16 bitcast (half 1.0 to i16))
+ %v0 = tail call i32 asm "v_mov_b32 $0, $1", "=v,A"(trunc i32 bitcast (float 1.0 to i32) to i16)
----------------
rampitec wrote:
It sounds like documentation problem to me. We really have no such control even in asm, not just inline asm. You have 0x3c00, when it comes to actual encoding we will see if it fits the operand definition and use inline constant if we can. Otherwise it will be a literal. There is even no way to force a literal if we can use inline (although lit() may mean to do it, but it does not).
https://github.com/llvm/llvm-project/pull/81345
More information about the llvm-commits
mailing list