5.1 General troubleshooting advice

Provides general advice for troubleshooting problems with ARM® Compiler.

SVE instructions are not generated

If your compiled code does not contain SVE instructions, check the following:

  • Ensure that ARM Compiler was used to compile the code.

    If your output files are human-readable assembly code (that is, you specified the -S option), examine the .s output files and look for lines containing the .ident keyword. If the output is produced by ARM Compiler, lines similar to the following are displayed:

    .ident    "Component: ARM Compiler 6.6.0: armclang [5c50d600]"

    If your output files are ELF object files, use fromelf to inspect the .comment section of an object file. If the output is produced by ARM Compiler, lines similar to the following are displayed:

    $ fromelf -v main.o | grep armclang
      Component: ARM Compiler 6.6.0: armclang [5c50d600]
  • Check you specified an optimization level of -O2 or greater.

    The SVE auto-vectorizer is only invoked if the optimization level specified is -O2 or greater. Ensure that your compiler invocation includes a flag such as –O2 to enable SVE auto-vectorization.

    See Compiler options for details of the compiler flags that control the behavior of the SVE auto-vectorizer.

  • Consider modifying source code.

    When you have confirmed that the SVE Compiler is being invoked, and there is a loop that is not being vectorized, see Best practices to enable auto-vectorization for examples and hints on how to encourage the compiler to auto-vectorize your code.

Fatal error: L6450U: Cannot find library m

Code that makes use of the mathematical functions declared in math.h usually requires a -lm flag when compiling on a POSIX environment such as Linux, to link in the Linux implementation of those functions for that host system. For this reason, you might find that such a flag is added to your scripts or makefiles.

ARM Compiler is designed to run in a bare metal environment, and automatically includes implementations of these functions, and so no such flag is necessary.

If you encounter error L6450U, remove the -lm flag from your makefiles or build scripts.

Non-ConfidentialPDF file icon PDF versionARM 100891_0607_01_en
Copyright © 2016, 2017 ARM Limited or its affiliates. All rights reserved.