Skip to content
Snippets Groups Projects
Commit cc06c01d authored by Georg-Johann Lay's avatar Georg-Johann Lay Committed by Georg-Johann Lay
Browse files

re PR tree-optimization/56064 (Optimize VIEW_CONVERT_EXPR with FIXED_CST)

gcc/
	PR tree-optimization/56064
	* fixed-value.c (fixed_from_double_int): New function.
	* fixed-value.h (fixed_from_double_int): New prototype.
	(const_fixed_from_double_int): New static inline function.
	* fold-const.c (native_interpret_fixed): New static function.
	(native_interpret_expr) <FIXED_POINT_TYPE>: Use it.
	(can_native_interpret_type_p) <FIXED_POINT_TYPE>: Return true.
	(native_encode_fixed): New static function.
	(native_encode_expr) <FIXED_CST>: Use it.
	(native_interpret_int): Move double_int worker code to...
	* double-int.c (double_int::from_buffer): ...this new static method.
	* double-int.h (double_int::from_buffer): Prototype it.

gcc/testsuite/
	PR tree-optimization/56064
	* gcc.dg/fixed-point/view-convert.c: New test.

From-SVN: r195574
parent d394a308
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment