See bug 40873: https://bugs.llvm.org/show_bug.cgi?id=40873
Before this change assembler required constant expressions to start with a number, for example:
x = 1 v_or3_b32 v1, v2, v3, 1+x // ok v_or3_b32 v1, v2, v3, x+1 // error v_ceil_f32 v1, abs(1+x) // ok v_ceil_f32 v1, abs(x+1) // error
This fix enables to use arbitrary constant expressions with generic imm operands and operands of VOP modifiers like abs(...) and neg(...):
x = 1 v_or3_b32 v1, v2, v3, 1+x // ok v_or3_b32 v1, v2, v3, x+1 // ok v_ceil_f32 v1, abs(1+x) // ok v_ceil_f32 v1, abs(x+1) // ok
Some syntactic sugar constructs like hwreg(...) still expect constant expressions to start with a number; this will be fixed separately. See bug 40820: https://bugs.llvm.org/show_bug.cgi?id=40820
Can we be more descriptive in the message? like "error: Floating-point expressions are not supported"?