HomePhabricator

Use correct way to test for MIPS arch after rOMP355687

Authored by dim on Apr 22 2019, 12:20 PM.

Description

Use correct way to test for MIPS arch after rOMP355687

Summary:
I ran into some issues after rOMP355687, where __atomic_fetch_add was
being used incorrectly on x86, and this turns out to be caused by the
following added conditionals:

#if defined(KMP_ARCH_MIPS)

The problem is, these macros are always defined, and are either 0 or 1
depending on the architecture. E.g. the correct way to test for MIPS
is:

#if KMP_ARCH_MIPS

Reviewers: petarj, jlpeyton, Hahnfeld, AndreyChurbanov

Reviewed By: petarj, AndreyChurbanov

Subscribers: AndreyChurbanov, sdardis, arichardson, atanasyan, jfb, jdoerfert, openmp-commits, llvm-commits

Tags: #openmp

Differential Revision: https://reviews.llvm.org/D60938

llvm-svn: 358911

Details

Committed
dimApr 22 2019, 12:20 PM
Reviewer
petarj
Differential Revision
D60938: Use correct way to test for MIPS arch after rOMP355687
Parents
rG2b744665308f: Use const DebugLoc&
Branches
Unknown
Tags
Unknown