This allows to use a short div/rem expansion given a kernel with __builtin_assume() call:
kernel void divrem24_uint(global int *a, uint x) { uint id = get_local_id(0); __builtin_assume(x < 42); a[id / x] = 0; }
Paths
| Differential D49761
[AMDGPU] Use AssumptionCacheTracker in the divrem32 expansion ClosedPublic Authored by rampitec on Jul 24 2018, 3:00 PM.
Details Summary This allows to use a short div/rem expansion given a kernel with __builtin_assume() call: kernel void divrem24_uint(global int *a, uint x) { uint id = get_local_id(0); __builtin_assume(x < 42); a[id / x] = 0; }
Diff Detail
Event TimelineHerald added subscribers: t-tye, tpr, dstuttard and 4 others. · View Herald TranscriptJul 24 2018, 3:00 PM rampitec added a parent revision: D49759: Fix llvm::ComputeNumSignBits with some operations and llvm.assume.Jul 24 2018, 3:01 PM Comment Actions LGTM
This revision is now accepted and ready to land.Jul 25 2018, 7:47 AM Closed by commit rL337938: [AMDGPU] Use AssumptionCacheTracker in the divrem32 expansion (authored by rampitec). · Explain WhyJul 25 2018, 10:02 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 157299 llvm/trunk/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
llvm/trunk/test/CodeGen/AMDGPU/divrem24-assume.ll
|