aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorLei Zhang <antiagainst@google.com>2020-07-13 16:20:59 -0400
committerLei Zhang <antiagainst@google.com>2020-08-05 14:52:04 -0400
commit0d03b3901d38484683cd9d6d0d6382967599e92b (patch)
tree539d29fd7c0a1e73e556973dbc29d1e706e34482 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parentf3056dcc02d5dcde1669f61084a940e1ded3dfda (diff)
downloadllvm-0d03b3901d38484683cd9d6d0d6382967599e92b.zip
llvm-0d03b3901d38484683cd9d6d0d6382967599e92b.tar.gz
llvm-0d03b3901d38484683cd9d6d0d6382967599e92b.tar.bz2
[mlir][StandardToSPIRV] Use spv.UMod for index re-calculation
Per Vulkan's SPIR-V environment spec: "While the OpSRem and OpSMod instructions are supported by the Vulkan environment, they require non-negative values and thus do not enable additional functionality beyond what OpUMod provides." The `getOffsetForBitwidth` function is used for lowering std.load and std.store, whose indices are of `index` type and cannot be negative. So we should be okay to use spv.UMod directly here to be exact. Also made the comment explicit about the assumption. Differential Revision: https://reviews.llvm.org/D83714
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
0 files changed, 0 insertions, 0 deletions