No need to consider hint clause kind as the main atomic clause kind at the
codegen.
Differential Revision: https://reviews.llvm.org/D99611
case OMPC_exclusive:
case OMPC_uses_allocators:
case OMPC_affinity:
- default:
+ case OMPC_init:
+ case OMPC_inbranch:
+ case OMPC_notinbranch:
+ case OMPC_link:
+ case OMPC_use:
llvm_unreachable("Clause is not allowed in 'omp atomic'.");
}
}
C->getClauseKind() != OMPC_acq_rel &&
C->getClauseKind() != OMPC_acquire &&
C->getClauseKind() != OMPC_release &&
- C->getClauseKind() != OMPC_relaxed) {
+ C->getClauseKind() != OMPC_relaxed && C->getClauseKind() != OMPC_hint) {
Kind = C->getClauseKind();
break;
}
// CHECK: {{invoke|call}} void @_ZN2StD1Ev(%struct.St* {{[^,]*}} [[TEMP_ST_ADDR]])
#pragma omp atomic
St().get() %= b;
-#pragma omp atomic
+#pragma omp atomic hint(6)
s.field++;
// CHECK: invoke void @_ZN2StC1Ev(%struct.St* {{[^,]*}} [[TEMP_ST_ADDR:%.+]])
// CHECK: [[SCALAR_ADDR:%.+]] = invoke nonnull align 4 dereferenceable(4) i32* @_ZN2St3getEv(%struct.St* {{[^,]*}} [[TEMP_ST_ADDR]])