Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llc crash due to large structure return #51817

Closed
tclin914 opened this issue Nov 11, 2021 · 2 comments
Closed

llc crash due to large structure return #51817

tclin914 opened this issue Nov 11, 2021 · 2 comments
Labels
backend:RISC-V bugzilla Issues migrated from bugzilla

Comments

@tclin914
Copy link
Contributor

Bugzilla Link 52475
Version trunk
OS Linux
CC @asb,@topperc,@frasercrmck,@tclin914

Extended Description

Testcase:

define <128 x i32> @​ret_split_v128i32(<128 x i32>* %x) {
%v = load <128 x i32>, <128 x i32>* %x
ret <128 x i32> %v
}

This testcase is extracted from llvm/test/CodeGen/RISCV/rvv/fixed-vectors-calling-conv.ll

Execution command:

llc -mtriple=riscv64 -mattr=+experimental-v -riscv-v-vector-bits-min=128 -riscv-v-fixed-length-vector-lmul-max=4 -pre-RA-sched=list-burr foo.ll --disable-machine-cse test.ll

Change schedule policy for pre-RA to list-burr and disable machine-cse.

Execution result:

Use of %2 does not have a corresponding definition on every path: 48r %3:gpr = ADDI %2:gpr, 448 LLVM ERROR: Use not jointly dominated by defs.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace. Stack dump:
...

I think this bug is that DemoteRegister copied out in return bb doesn't be chained with DemoteRegister copied in in entry bb.

@tclin914
Copy link
Contributor Author

Update execution command:

llc -mtriple=riscv64 -mattr=+experimental-v -riscv-v-vector-bits-min=128 -riscv-v-fixed-length-vector-lmul-max=4 -pre-RA-sched=list-burr foo.ll --disable-machine-cse

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
@frasercrmck
Copy link
Contributor

Thanks for the bug report! It should now be fixed by b0319ab. Your hunch was correct: it was an issue with chaining DemoteRegister.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:RISC-V bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

2 participants