[PATCH] D101610: [AMDGPU] Tidy up some simple expressions for clarity NFC
David Stuttard via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 30 03:14:21 PDT 2021
dstuttard updated this revision to Diff 341826.
dstuttard added a comment.
Extra include not required
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101610/new/
https://reviews.llvm.org/D101610
Files:
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
Index: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -4244,7 +4244,7 @@
unsigned AddrComponents = (BaseOpcode->Coordinates ? Dim->NumCoords : 0) +
(BaseOpcode->LodOrClampOrMip ? 1 : 0);
if (IsA16)
- AddrWords += (AddrComponents + 1) / 2;
+ AddrWords += divideCeil(AddrComponents, 2);
else
AddrWords += AddrComponents;
@@ -4252,7 +4252,7 @@
if (PackDerivatives)
// There are two gradients per coordinate, we pack them separately.
// For the 3d case, we get (dy/du, dx/du) (-, dz/du) (dy/dv, dx/dv) (-, dz/dv)
- AddrWords += (Dim->NumGradients / 2 + 1) / 2 * 2;
+ AddrWords += alignTo<2>(Dim->NumGradients / 2);
else
AddrWords += Dim->NumGradients;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101610.341826.patch
Type: text/x-patch
Size: 954 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210430/ea4580c9/attachment.bin>
More information about the llvm-commits
mailing list