[PATCH] D35569: [ARM] Remove FeatureNoARM implies ModeThumb.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 11:04:46 PDT 2017


fhahn added a comment.

The assertion on X86 and ARM (with this patch) can be triggered using clang and the target function attribute, e.g.

`clang -target i386-unknown-linux -march=pentium2 test.c -c`

  __attribute__((target("64bit-mode"))) int bar(int a, int b)
  {
      return a + b % a;
  }
  __attribute__((target("32bit-mode"))) int foo(int a, int b)
  {
      return a + b % a;
  }

and

`clang -target armv7m-eabi -c  test-arm.c`

  __attribute__((target("thumb"))) int bar(int a, int b)
  {
      return a + b % a;
  }
  __attribute__((target("arm"))) int foo(int a, int b)
  {
      return a + b % a;
  }

Mixed ARM/Thumb LTO could also expose this problem.


https://reviews.llvm.org/D35569





More information about the llvm-commits mailing list