[PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

Björn Weber bweber@blackberry.com
Fri Mar 16 14:31:00 GMT 2018


I ran a number of tests against this patch on non-ARM platforms and 
noticed something weird. The default_speculation_safe_load seems to have 
a logic twist. When cmpptr is greater or equal to the upper_bound the 
call is considered in-range.

In: gcc/targhooks.c
[..]
       do_compare_rtx_and_jump (cmpptr, upper_bound, GEU, true, ptr_mode,
			       NULL, NULL, inrange_label,
			       profile_probability::never ());
[..]

I am pretty certain that this is supposed to be LTU instead.
The code is the same for default_speculation_safe_load() in the V2 of 
the patch.

-- 
Bj\366rn Weber



More information about the Gcc-patches mailing list