llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.44k stars 11.75k forks source link

[AMDGPU][MC][GFX8+] Add a symbolic name for 1/2pi #38644

Open dpreobra opened 5 years ago

dpreobra commented 5 years ago
Bugzilla Link 39296
Version trunk
OS All
CC @atamazov,@arsenm

Extended Description

Currently 1/2pi may only be specified in a numeric form. This is inconvenient and error-prone. Examples:

v_add_f16 v0, 0.15915494, v1
v_add_f64 v[0:1], v[2:3], 0.159154943091895317852646485335

Assembler should support special syntax or a symbolic name for this constant. For example:

v_add_f16 v0, INV2PI, v1
v_add_f64 v[0:1], v[2:3], INV2PI

Any suggestions?

dpreobra commented 5 years ago

assigned to @dpreobra