aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorLei Zhang <antiagainst@google.com>2020-07-12 13:03:23 -0400
committerLei Zhang <antiagainst@google.com>2020-07-13 16:15:31 -0400
commit4ba45a778a13eab1495a75a14682f874016f3d21 (patch)
treec7383f94e0ee62a4356b9567f554f0cb80824198 /clang/lib/CodeGen/CodeGenFunction.cpp
parent9908a3b9f521c954cbf6adcec35b14b2f6c8da49 (diff)
downloadllvm-4ba45a778a13eab1495a75a14682f874016f3d21.zip
llvm-4ba45a778a13eab1495a75a14682f874016f3d21.tar.gz
llvm-4ba45a778a13eab1495a75a14682f874016f3d21.tar.bz2
[mlir][StandardToSPIRV] Fix conversion for signed remainder
Per the Vulkan's SPIR-V environment spec, "for the OpSRem and OpSMod instructions, if either operand is negative the result is undefined." So we cannot directly use spv.SRem/spv.SMod if either operand can be negative. Emulate it via spv.UMod. Because the emulation uses spv.SNegate, this commit also defines spv.SNegate. Differential Revision: https://reviews.llvm.org/D83679
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions