[PATCH] D74373: AMDGPU/GlobalISel: Handle sbfe/ubfe intrinsic
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 11 07:59:53 PST 2020
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp:1484
+ auto OffsetMask = B.buildConstant(S32, maskTrailingOnes<unsigned>(16));
+ auto ClampOffset = B.buildAnd(S32, OffsetReg, OffsetMask);
+
----------------
arsenm wrote:
> foad wrote:
> > Is the behaviour of the intrinsic well-defined when the "offset" argument is huge enough for this to make a difference?
> I'm assuming the intrinsic is supposed to match the behavior of the V_BFE_* instructions, which ignore the high bits
Fair enough. ANDing with 31 or 63 would fit better into a single-word instruction encoding, wouldn't it?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74373/new/
https://reviews.llvm.org/D74373
More information about the llvm-commits
mailing list