-
- Downloads
"libcpp/charset.cc" did not exist on "c4d6dcacfca1b804504515496e6d9de176d7f51e"
CCP: handle division by a power of 2 as a right shift.
We have some code in range-ops that sets better maybe nonzero bits for TRUNC_DIV_EXPR by a power of 2 than CCP does, by just shifting the mask. I'd like to offload this functionality into the CCP mask tracking code, which already does the right thing for right shifts. The testcase for this change is gcc.dg/tree-ssa/vrp123.c and gcc.dg/tree-ssa/pr107541.c. gcc/ChangeLog: * range-op.cc (operator_div::fold_range): Call update_known_bitmask. * tree-ssa-ccp.cc (bit_value_binop): Handle divisions by powers of 2 as a right shift.
Loading
Please register or sign in to comment