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: unassignedb...@nondot.org
          Reporter: xtk...@gmail.com
                CC: htmldevelo...@gmail.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to