Support `+inf` and `-inf` literals in MIR parser.
Open
floating-point
llvm:codegen
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Currently, `MIR` does not support `+inf` and `-inf` literals.
```
# okay
G_FCONSTANT float 0x7FF0000000000000
G_FCONSTANT float f0x7F800000
# rejected
G_FCONSTANT float +inf
```
As noted here:
https://github.com/llvm/llvm-project/pull/221019#discussion_r3928024352
Contributor guide
Research direction
Start at the MIR parser and trace how floating-point literals are currently recognized, using the accepted hexadecimal examples as a reference. Add support for both `+inf` and `-inf`, then verify that these literals are accepted while the existing forms continue to work.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100