Skip to content

Commit f564734

Browse files
authored
Update the adaptive profile's fp comptutation support (#62)
* Fix double record output typo. Add fptoui, fptosi, uitofp, and sitofp instructions to adaptive profile floating-point computation support. * Update specification/profiles/Adaptive_Profile.md
1 parent a406067 commit f564734

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎specification/profiles/Adaptive_Profile.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,14 @@ LLVM instructions must be supported:
760760
| `fsub` | Subtracts two floating-point values. | |
761761
| `fmul` | Multiplies two floating-point values. | |
762762
| `fdiv` | Divides two floating-point values. | Division by zero leads to undefined behavior, no support for `NaN`. |
763+
| `frem` | Returns the remainder from the division of its two floating-point operands. | Division by zero leads to undefined behavior, no support for `NaN`. |
763764
| `fcmp` | Compares two floating-point | Comparison options are `olt`, `ole`, `ogt`, `oge`, `oeq`, `one`, `ord`, `ult`, `ule`, `ugt`, `uge`, `ueq`, `une`, `uno`, `false`, `true`. |
764765
| `fpext .. to` | Casts a value of floating-point type to a larger floating-point type. | May be used at any point in the program if classical computations on both the input and the output type are supported. May only be used as part of a call to an output recording function if computations on the output type are not supported. |
765766
| `fptrunc .. to` | Casts a value of floating-point type to a smaller floating-point type. | May be used at any point in the program if classical computations on both the input and the output type are supported. May only be used as part of a call to an output recording function if computations on the output type are not supported. |
767+
| `fptoui` | Converts a value of floating-point type to an unsigned integer type value. | May be used at any point in the program if classical computations on both the input and the output type are supported. |
768+
| `fptosi` | Converts a value of floating-point type to a signed integer type value. | May be used at any point in the program if classical computations on both the input and the output type are supported. |
769+
| `uitofp` | Converts a value as an unsigned integer to the target floating-point type. | May be used at any point in the program if classical computations on both the input and the output type are supported. |
770+
| `sitofp` | Converts a value as a signed integer to the target floating-point type. | May be used at any point in the program if classical computations on both the input and the output type are supported. |
766771

767772
If the backend chooses to support multiple target branching, the following LLVM
768773
instruction must be supported:
@@ -800,7 +805,7 @@ additional runtime function must be available:
800805

801806
| Function | Signature | Description |
802807
| :---------------------------------- | :-------------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
803-
| __quantum__rt__float_record_output | `void(f64,ptr)` | Records a floating-point value in the generated output. The second parameter defines the string label for the value. Depending on the output schema, the label is included in the output or omitted. |
808+
| __quantum__rt__double_record_output | `void(double,ptr)` | Records a floating-point value in the generated output. The second parameter defines the string label for the value. Depending on the output schema, the label is included in the output or omitted. |
804809

805810
### Output Recording
806811

0 commit comments

Comments
 (0)