From: Reid Spencer
- <result> = fpext <ty> <value> to <ty2> ; yields ty2 + <result> = fptrunc <ty> <value> to <ty2> ; yields ty2
The 'fpext' extends a floating point value to a larger -floating point value.
+The 'fptrunc' instruction truncates value to type +ty2.
+The 'fpext' instruction takes a -floating point value to cast, -and a floating point type to cast it to.
+The 'fptrunc' instruction takes a floating + point value to cast and a floating point type to +cast it to. The size of value must be larger than the size of +ty2. This implies that fptrunc cannot be used to make a +no-op cast.
The 'fpext' instruction extends the value from one floating -point type to another. If the type of the value and ty2 are -the same, the instruction is considered a no-op cast because no bits -change.
+The 'fptrunc' instruction converts a +floating point value from a larger type to a smaller +type. If the value cannot fit within the destination type, ty2, then +the results are undefined.
- %X = fpext float 3.1415 to double ; yields double:3.1415 - %Y = fpext float 1.0 to float ; yields float:1.0 (no-op) + %X = fptrunc double 123.0 to float ; yields float:123.0 + %Y = fptrunc double 1.0E+300 to float ; yields undefined
- <result> = fptrunc <ty> <value> to <ty2> ; yields ty2 + <result> = fpext <ty> <value> to <ty2> ; yields ty2
The 'fptrunc' instruction truncates value to type -ty2.
- +The 'fpext' extends a floating point value to a larger +floating point value.
The 'fptrunc' instruction takes a floating - point value to cast and a floating point type to -cast it to. The size of value must be larger than the size of -ty2. This implies that fptrunc cannot be used to make a -no-op cast.
+The 'fpext' instruction takes a +floating point value to cast, +and a floating point type to cast it to.
The 'fptrunc' instruction converts a -floating point value from a larger type to a smaller -type. If the value cannot fit within the destination type, ty2, then -the results are undefined.
+The 'fpext' instruction extends the value from one floating +point type to another. If the type of the value and ty2 are +the same, the instruction is considered a no-op cast because no bits +change.
- %X = fptrunc double 123.0 to float ; yields float:123.0 - %Y = fptrunc double 1.0E+300 to float ; yields undefined + %X = fpext float 3.1415 to double ; yields double:3.1415 + %Y = fpext float 1.0 to float ; yields float:1.0 (no-op)