Issue 73512
Summary Miscompile after changes to MachineCopyPropagation in commit cae46f6210293ba4d3568eb2
Labels
Assignees
Reporter bjope
    We started to see miscompiles downstream after the update to MachineCopyPropagation here: https://github.com/llvm/llvm-project/commit/cae46f6210293ba4d3568eb21b935d438934290d

I managed to reduce one failure and convert it into this (just picking AMDGCPU as target to get something with register tuples):

```
# RUN: llc -mtriple=amdgcn-- -mcpu=gfx900 -run-pass machine-cp -o - %s

---
name:            test1
body:             |
  bb.0:
 liveins: $sgpr4_sgpr5, $sgpr6_sgpr7

    $sgpr2_sgpr3 = COPY $sgpr6_sgpr7
    $sgpr0 = COPY $sgpr3
    S_NOP 0, implicit-def $sgpr0
    $sgpr3 = COPY killed $sgpr5
    $sgpr2_sgpr3 = COPY $sgpr6_sgpr7
    S_NOP 0, implicit $sgpr2_sgpr3
...
```

Without the changes to MCP:
```
> llc -mtriple=amdgcn-- -mcpu=gfx900 -o - -run-pass machine-cp mcp.mir

 $sgpr2_sgpr3 = COPY $sgpr6_sgpr7
    S_NOP 0, implicit-def $sgpr0
 $sgpr2_sgpr3 = COPY $sgpr6_sgpr7
    S_NOP 0, implicit $sgpr2_sgpr3
```
After cae46f6210293ba4d3568e:
```
> llc -mtriple=amdgcn-- -mcpu=gfx900 -o - -run-pass machine-cp mcp.mir

 $sgpr2_sgpr3 = COPY $sgpr6_sgpr7
    S_NOP 0, implicit-def $sgpr0
 $sgpr3 = COPY killed $sgpr5
    S_NOP 0, implicit $sgpr2_sgpr3
```

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to