[llvm-bugs] [Bug 43576] New: FFT and Sparse matmult in Scimark2 are slower with -O2 & -O3 than -O1

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 5 19:47:26 PDT 2019


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

            Bug ID: 43576
           Summary: FFT and Sparse matmult in Scimark2 are slower with -O2
                    & -O3 than -O1
           Product: clang
           Version: 9.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hehaochen13 at nudt.edu.cn
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

FFT and Sparse matmult in
Scimark2(https://math.nist.gov/scimark2/download_c.html) are slower with -O2 &
-O3 than -O1.

In gcc-9.2.0, everything is OK.

All the experiments are carried out in CentOS 7.6.1810 (Core) 

╔════════════════════════════╤═════════════╤════════════════╤═══════════╗
║ make CC=clang-9/gcc \      │             │                │           ║
║ CFLAGS="-Ox -march=native” │  Mflops in  │    Comment     │ Mflops in ║
║                            │ clang-9.0.0 │                │ gcc-9.2.0 ║
║ ./scimark2                 │             │                │           ║
╠══════╤═════════════════════╪═════════════╪════════════════╪═══════════╣
║ -O0  │ Composite Score     │ 480.30      │                │ 435.11    ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ FFT                 │ 356.03      │                │ 326.45    ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ SOR                 │ 772.92      │                │ 768.71    ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ MonteCarlo          │ 77.57       │                │ 92.10     ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ Sparse matmult      │ 459.64      │                │ 419.38    ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ LU                  │ 735.37      │                │ 568.94    ║
╟──────┼─────────────────────┼─────────────┼────────────────┼───────────╢
║ -O1  │ Composite Score     │ 1494.63     │                │ 1451.81   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ FFT                 │ 1430.49     │                │ 1400.51   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ SOR                 │ 1117.54     │                │ 856.00    ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ MonteCarlo          │ 439.39      │                │ 523.79    ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ Sparse matmult      │ 2179.07     │                │ 2188.18   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ LU                  │ 2306.67     │                │ 2290.57   ║
╟──────┼─────────────────────┼─────────────┼────────────────┼───────────╢
║ -O2  │ Composite Score     │ 1743.93     │                │ 1700.95   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ FFT                 │ **1300.62** │ Slower than O1 │ 1618.03   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ SOR                 │ 1123.46     │                │ 1067.22   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ MonteCarlo          │ 440.73      │                │ 584.45    ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ Sparse matmult      │ **1771.17** │ Slower than O1 │ 2446.48   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ LU                  │ 4083.67     │                │ 2788.59   ║
╟──────┼─────────────────────┼─────────────┼────────────────┼───────────╢
║ -O3  │ Composite Score     │ 1786.63     │                │ 2376.34   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ FFT                 │ **1304.30** │ Slower than O1 │ 1700.11   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ SOR                 │ 1128.26     │                │ 1540.28   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ MonteCarlo          │ 439.83      │                │ 587.74    ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ Sparse matmult      │ **1896.98** │ Slower than O1 │ 2443.62   ║
║      ├─────────────────────┼─────────────┼────────────────┼───────────╢
║      │ LU                  │ 4163.75     │                │ 5609.94   ║
╚══════╧═════════════════════╧═════════════╧════════════════╧═══════════╝

-- 
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/20191006/75327502/attachment-0001.html>


More information about the llvm-bugs mailing list