SelectionDAG: Lower some range metadata to AssertZext
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 8 Feb 2016 16:28:19 +0000 (16:28 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 8 Feb 2016 16:28:19 +0000 (16:28 +0000)
commit2bba779272a23094b3a1ff7b3c56259d51f457df
treee4798edd0bbc1b350a115d3abc3af47298ca0ef3
parent3d1d076f794279812b59ba71a0f53bd86ab709dd
SelectionDAG: Lower some range metadata to AssertZext

If a range has a lower bound of 0, add an AssertZext from the
nearest floor power of two.

This allows operations with some workitem intrinsics with known
maximum ranges to use fast 24-bit multiplies.

llvm-svn: 260109
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
llvm/test/CodeGen/AArch64/lower-range-metadata-func-call.ll [new file with mode: 0644]
llvm/test/CodeGen/AMDGPU/lower-range-metadata-intrinsic-call.ll [new file with mode: 0644]