[llvm-bugs] [Bug 49384] New: [ARM] Expressions incorrectly reordered by optimization

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Mar 1 14:27:42 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49384

            Bug ID: 49384
           Summary: [ARM] Expressions incorrectly reordered by
                    optimization
           Product: new-bugs
           Version: 11.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: xtkoba at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 24579
  --> https://bugs.llvm.org/attachment.cgi?id=24579&action=edit
A reproducer code derived from the Ruby programming language project

When supplied with -O2 or higher (-O3, -Os or -Oz) optimization option, clang
incorrectly reorders two expressions for 32-bit ARM targets.

This issue was first discovered for Android (with target
armv7a-linux-androideabi16), but it is reproducible for GNU/Linux (with target
armv7a-softfloat-linux-gnueabi).

A reproducer code written in C is attached. When compiled with -O2
-DWORKAROUND=0 and run, it aborts due to assertion failure. This assertion is
expected to hold at any time.

I suppose this issue is specific to 32-bit ARM, and I confirmed that the
reproducer code exits normally with targets
{aarch64,i686,powerpc64le,riscv64,x86_64}-unknown-linux-gnu.

This issue was discovered in the Ruby programming language project and was
first reported to https://bugs.ruby-lang.org/issues/17540

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210301/7245be1e/attachment.html>


More information about the llvm-bugs mailing list