[PATCH] D95891: [ARM] Do not emit ldrexd/strexd on Cortex-M chips

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 3 06:07:48 PST 2021


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMISelLowering.cpp:18761
   // can never succeed. So at -O0 we need a late-expanded pseudo-inst instead.
+  unsigned Size = AI->getOperand(1)->getType()->getPrimitiveSizeInBits();
   bool HasAtomicCmpXchg =
----------------
I think this could benefit from a comment saying that this is a special case for LDREXD and STREXD as they are not available in v7-m and v8-m.


================
Comment at: llvm/test/CodeGen/ARM/atomic-64bit.ll:5
 ; RUN: llc < %s -mtriple=thumbebv7-none-linux-gnueabihf | FileCheck %s --check-prefix=CHECK-THUMB --check-prefix=CHECK-THUMB-BE
+; RUN: llc < %s -mtriple=armv7m--none-eabi | FileCheck %s --check-prefix=CHECK-ARMV7M
 
----------------
Can you add an armv8m RUN line too?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95891/new/

https://reviews.llvm.org/D95891



More information about the llvm-commits mailing list