[OpenMP][IRBuilder] Handle floats for atomic update and fix AllocaIP for update/capture
authorShraiysh Vaishay <Shraiysh.Vaishay@amd.com>
Thu, 10 Feb 2022 05:08:06 +0000 (10:38 +0530)
committerShraiysh Vaishay <Shraiysh.Vaishay@amd.com>
Thu, 10 Feb 2022 07:46:10 +0000 (13:16 +0530)
commit35dfa78ff8d44733b1c805309f0bbd4a8c960897
tree9f743fde3b931b4187180ac1b3a91cf188fe155e
parent7d7ebf3cf06e6845dc5b83912f0adecbf69e1123
[OpenMP][IRBuilder] Handle floats for atomic update and fix AllocaIP for update/capture

This patch fixes `createAtomicUpdate` for lowering with float types.
Test added for the same.

This patch also changes the alloca argument for createAtomicUpdate and
createAtomicCapture from `Instruction*` to `InsertPointTy`. This is in
line with the other functions of the OpenMPIRBuilder class which take
AllocaIP as an `InsertPointTy`.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D118227
llvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
llvm/unittests/Frontend/OpenMPIRBuilderTest.cpp