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

[Polly] Run-time alias check assert with "Invalid operands for select" #21541

Closed
tobiasgrosser opened this issue Oct 6, 2014 · 3 comments
Closed
Labels
bugzilla Issues migrated from bugzilla polly

Comments

@tobiasgrosser
Copy link
Contributor

Bugzilla Link 21167
Resolution FIXED
Resolved on Jan 18, 2016 17:00
Version unspecified
OS Linux
Attachments Test case requires -polly-codegen-scev, Test case II
CC @jdoerfert

Extended Description

With Polly trunk polly crashes on the attached test cases with the following command line:

polly-opt polly-codegen-isl -polly-code-generator=isl

printing the following back trace:

opt: /home/grosser/Projects/polly/git/include/llvm/IR/Instructions.h:1544: void llvm::SelectInst::init(llvm::Value , llvm::Value , llvm::Value ): Assertion `!areInvalidOperands(C, S1, S2) && "Invalid operands for select"' failed.
0 libLLVMSupport.so 0x00007f2e0d374a6e llvm::sys::PrintStackTrace(_IO_FILE
) + 46
1 libLLVMSupport.so 0x00007f2e0d374d3b
2 libLLVMSupport.so 0x00007f2e0d376b46
3 libpthread.so.0 0x00007f2e0a4f4340
4 libc.so.6 0x00007f2e0971bbb9 gsignal + 57
5 libc.so.6 0x00007f2e0971efc8 abort + 328
6 libc.so.6 0x00007f2e09714a76
7 libc.so.6 0x00007f2e09714b22
8 libPolly.so 0x00007f2e0898e141
9 libPolly.so 0x00007f2e0898e09d
10 libPolly.so 0x00007f2e0898dfed
11 libPolly.so 0x00007f2e0898df97
12 libPolly.so 0x00007f2e08982250
13 libPolly.so 0x00007f2e0899959c polly::IslExprBuilder::createOpSelect(isl_ast_expr
) + 636
14 libPolly.so 0x00007f2e08999ff9 polly::IslExprBuilder::createOp(isl_ast_expr
) + 297
15 libPolly.so 0x00007f2e08997e07 polly::IslExprBuilder::create(isl_ast_expr*) + 167
16 libPolly.so 0x00007f2e089985be polly::IslExprBuilder::createAccessAddress(isl_ast_expr*) + 654
17 libPolly.so 0x00007f2e0899a1ea polly::IslExprBuilder::createOpAddressOf(isl_ast_expr*) + 282
18 libPolly.so 0x00007f2e0899a03b polly::IslExprBuilder::createOp(isl_ast_expr*) + 363
19 libPolly.so 0x00007f2e08997e07 polly::IslExprBuilder::create(isl_ast_expr*) + 167
20 libPolly.so 0x00007f2e08999644 polly::IslExprBuilder::createOpICmp(isl_ast_expr*) + 148
21 libPolly.so 0x00007f2e0899a025 polly::IslExprBuilder::createOp(isl_ast_expr*) + 341
22 libPolly.so 0x00007f2e08997e07 polly::IslExprBuilder::create(isl_ast_expr*) + 167
23 libPolly.so 0x00007f2e08999b4d polly::IslExprBuilder::createOpBoolean(isl_ast_expr*) + 189
24 libPolly.so 0x00007f2e0899a00f polly::IslExprBuilder::createOp(isl_ast_expr*) + 319

test-invalid-operands-for-select.ll it needs -polly-codegen-scev to crash, test-invalid-operands-for-select-2.ll asserts even without this option.

@jdoerfert
Copy link
Member

The bug can easily be fixed in the IslExprBuilder::createSelect, however the min/max accesses we create looked very odd. The fix [1] will simplify the min/max accesses to expose empty cases but also add the extra handling to the createSelect.

[1] http://reviews.llvm.org/D5627

@jdoerfert
Copy link
Member

Fixed in r219208.

@tlattner
Copy link
Contributor

Move to Polly Product.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla polly
Projects
None yet
Development

No branches or pull requests

3 participants