------- Comment #25 from baldrick at gcc dot gnu dot org 2007-03-08 09:56 ------- I can't help feeling that VIEW_CONVERT_EXPR is not the right tool for implementing 'Valid. I think an intrinsic would be better, eg "int __builtin_nop(int)" which is defined to return its argument unchanged. Then 'Valid can be implemented as something like: x'Valid -> y = __builtin_nop(x); valid = (y>=lower_bound && y <=upper_bound); The point is that the intrinsic would be opaque to the optimizers, and would only be lowered to the identity function *after* the tree optimizers have run. One annoyance is that presumably intrinsics would be needed for all integer and float precisions, eg __builtin_nop8, __builtin_nop16, etc.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26797