HomePhabricator

[LoopIdiom] BCmp: loop exit count must not be wider than size_t that `bcmp`…

Description

[LoopIdiom] BCmp: loop exit count must not be wider than size_t that bcmp takes

As reported by Joerg Sonnenberger in IRC, for 32-bit systems,
where pointer and size_t are 32-bit, if you use 64-bit-wide variable
in the loop, you could end up with loop exit count being of the type
wider than the size_t. Now, i'm not sure if we can produce bcmp
from that (just truncate?), but we certainly should not assert/miscompile.

Details

Committed
lebedevriOct 14 2019, 12:46 PM
Parents
rL374810: [OPNEMP]Allow grainsize clause in combined task-based directives.
Branches
Unknown
Tags
Unknown