[llvm-bugs] [Bug 43859] New: check_cfc: dash g generate different code with Stack Slot Coloring

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Oct 31 05:21:15 PDT 2019


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

            Bug ID: 43859
           Summary: check_cfc: dash g generate different code with Stack
                    Slot Coloring
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: yechunliangcn at 163.com
                CC: llvm-bugs at lists.llvm.org

Debug Info should have no effect on codegen, using check_cfc to scan
llvm_test_suite, find a bug here: 

Reproduce:
----------------------------------------------------------------------
$HOME/llvm-project/clang/utils/check_cfc/clang++ -w -c -O1
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP/7zip/Archive/SwfHandler.cpp -o
tmp.ll -I $HOME/test-suite/MultiSource/Benchmarks/7zip/CPP/myWindows -I
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP -I
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP/include_windows

[result]
Check CFC, checking: dash_g_no_change, dash_s_no_change
/home/chris/test-suite/MultiSource/Benchmarks/7zip/CPP/7zip/Archive/SwfHandler.cpp
Code difference detected with -g
--- /tmp/tmpGFtFSg.o

+++ /tmp/tmpBtaqgK.o

@@ -522,6 +522,6 @@

  647:  41 54                   push   %r12
  649:  53                      push   %rbx
  64a:  48 83 ec 58             sub    $0x58,%rsp
- 64e:  4c 89 44 24 10          mov    %r8,0x10(%rsp)
- 653:  89 4c 24 18             mov    %ecx,0x18(%rsp)
+ 64e:  4c 89 44 24 08          mov    %r8,0x8(%rsp)
+ 653:  89 4c 24 10             mov    %ecx,0x10(%rsp)
  657:  41 89 d6                mov    %edx,%r14d
*** Diff truncated ***
----------------------------------------------------------------------


Reduce reproduce:
----------------------------------------------------------------------
clang++ -S -O1 -mllvm -opt-bisect-limit=5449
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP/7zip/Archive/SwfHandler.cpp -I
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP/myWindows -I
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP -I
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP/include_windows -o out1.s
2>log1
clang++ -g -S -O1 -mllvm -opt-bisect-limit=5453
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP/7zip/Archive/SwfHandler.cpp -I
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP/myWindows -I
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP -I
$HOME/test-suite/MultiSource/Benchmarks/7zip/CPP/include_windows -o out2.s
2>log2

[result]
out1.s:
    1593         movq    %r8, 16(%rsp)           # 8-byte Spill
    1594         movl    %ecx, 24(%rsp)          # 4-byte Spill
out2.s:
    2745         movq    %r8, 8(%rsp)            # 8-byte Spill
    2748         movl    %ecx, 16(%rsp)          # 4-byte Spill
log1:
    BISECT: running pass (5449) Stack Slot Coloring on function
log2:
    BISECT: running pass (5453) Stack Slot Coloring on function

-- 
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/20191031/9b02f984/attachment.html>


More information about the llvm-bugs mailing list