Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

[LoopDistribute] wrong code with -enable-loop-distribute -loop-distribute-non-if-convertible #38251

Open Quuxplusone opened 6 years ago

Quuxplusone commented 6 years ago
Bugzilla Link PR39278
Status NEW
Importance P enhancement
Reported by Jonas Paulsson (paulsson@linux.vnet.ibm.com)
Reported on 2018-10-13 07:23:36 -0700
Last modified on 2018-10-13 07:24:19 -0700
Version trunk
Hardware PC Linux
CC anemet@apple.com, llvm-bugs@lists.llvm.org, paulsson@linux.vnet.ibm.com, uweigand@de.ibm.com
Fixed by commit(s)
Attachments tc_loopdistr.i (355 bytes, text/plain)
Blocks
Blocked by
See also
Created attachment 21005
clang unreduced test case (csmith + creduce)

gcc -O1 -march=z10 -o a.out
gcc -O0 -march=z13 -o a.out
gcc -O1 -march=z13 -o a.out
clang -O0 -march=z10 -o a.out
clang -O0 -march=z13 -o a.out
clang -O3 -march=z10 -o a.out
clang -O3 -march=z13 -o a.out
clang -O3 -march=z13 -o a.out -mllvm -enable-loop-distribute -mllvm -loop-
distribute-non-if-convertible

All but the last prints 0, which prints 9.
Quuxplusone commented 6 years ago

Attached tc_loopdistr.i (355 bytes, text/plain): clang unreduced test case (csmith + creduce)