================ @@ -871,7 +871,8 @@ NVPTXTargetLowering::NVPTXTargetLowering(const NVPTXTargetMachine &TM, // actions computeRegisterProperties(STI.getRegisterInfo()); - setMinCmpXchgSizeInBits(32); + bool Allow16BitCAS = STI.getSmVersion() >= 70 && STI.getPTXVersion() >= 63; + setMinCmpXchgSizeInBits(Allow16BitCAS ? 16 : 32); ---------------- gonzalobg wrote:
Can we add a: ``` bool hasAtomCas16() const { return SmVersion >= 70 && PTXVersion >= 63; } ``` to NVPTXSubtarget instead, and call it here: ```suggestion setMinCmpXchgSizeInBits(STI.hasAtomCas16() ? 16 : 32); ``` https://github.com/llvm/llvm-project/pull/99646 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits