On 26/09/2023 17:48, Jakub Jelinek wrote:
On Tue, Sep 26, 2023 at 05:24:26PM +0100, Andre Vieira (lists) wrote:
@@ -5816,6 +5817,18 @@ get_references_in_stmt (gimple *stmt, vec<data_ref_loc,
va_heap> *references)
}
case IFN_MASK_LOAD:
case IFN_MASK_STORE:
+ case IFN_MASK_CALL:
+ {
+ tree orig_fndecl
+ = gimple_call_addr_fndecl (gimple_call_arg (stmt, 0));
+ if (!orig_fndecl)
+ {
+ clobbers_memory = true;
+ break;
+ }
+ if ((flags_from_decl_or_type (orig_fndecl) & ECF_CONST) == 0)
+ clobbers_memory = true;
+ }
Should IFN_MASK_LOAD/STORE really go through this? I thought those have
first argument address of the memory being conditionally loaded/stored, not
function address.
No it shouldn't, my bad...
Surprising testing didn't catch it though, I'm guessing
gimple_call_addr_fndecl just returned null everytime for those. I'll
clean it up.