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

Turn off DAGCombine at -O0 #22720

Open
pogo59 opened this issue Jan 27, 2015 · 2 comments
Open

Turn off DAGCombine at -O0 #22720

pogo59 opened this issue Jan 27, 2015 · 2 comments
Labels
bugzilla Issues migrated from bugzilla llvm:codegen

Comments

@pogo59
Copy link
Collaborator

pogo59 commented Jan 27, 2015

Bugzilla Link 22346
Version trunk
OS Windows NT
CC @adibiagio,@asl,@gregbedwell,@arsenm,@rotateright

Extended Description

DAGCombine should not run at -O0 (see discussion on review D7181).
http://reviews.llvm.org/D7181

However, doing that at the moment causes 19 test failures, including
one crash and one fail-to-select.

@pogo59
Copy link
Collaborator Author

pogo59 commented Jan 27, 2015

Here's the list of failing tests that I got:

Failing Tests (19):
LLVM :: CodeGen/AArch64/aarch64_f16_be.ll
LLVM :: CodeGen/AArch64/and-mask-removal.ll
LLVM :: CodeGen/ARM/2010-05-18-LocalAllocCrash.ll
LLVM :: CodeGen/ARM/Windows/alloca.ll
LLVM :: CodeGen/ARM/alloc-no-stack-realign.ll
LLVM :: CodeGen/ARM/big-endian-ret-f64.ll
LLVM :: CodeGen/ARM/vst3.ll
LLVM :: CodeGen/X86/atomic16.ll
LLVM :: CodeGen/X86/atomic32.ll
LLVM :: CodeGen/X86/atomic6432.ll
LLVM :: CodeGen/X86/avx-load-store.ll
LLVM :: CodeGen/X86/fast-isel-gep.ll
LLVM :: CodeGen/X86/inline-asm-tied.ll
LLVM :: CodeGen/X86/musttail.ll
LLVM :: CodeGen/X86/win32_sret.ll
LLVM :: CodeGen/X86/win64_eh.ll
LLVM :: CodeGen/XCore/threads.ll
LLVM :: DebugInfo/X86/op_deref.ll
LLVM :: DebugInfo/X86/vla.ll

CodeGen/ARM/2010-05-18-LocalAllocCrash.ll crashes in llc:
/home/probinson/projects/upstream/writeable/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp:776: void llvm::InstrEmitter::EmitMachineNode(llvm::SDNode*, bool, bool, llvm::DenseMap<llvm::SDValue, unsigned int>&): Assertion `NumMIOperands >= II.getNumOperands() && NumMIOperands <= II.getNumOperands() + II.getNumImplicitDefs() + NumImpUses && "#operands for dag node doesn't match .td file!"' failed.

CodeGen/X86/avx-load-store.ll gets a selection failure:
LLVM ERROR: Cannot select: 0x44b4df0: v2f64 = vector_shuffle 0x44b5230, 0x44b74c0<0,3> [ORD=3] [ID=14]
0x44b5230: v2f64 = scalar_to_vector 0x44b48a0 [ORD=3] [ID=13]
0x44b48a0: f64,ch = load 0x44a12e0, 0x44b4bd0, 0x44b5120<LD8[%ptr]> [ORD=2] [ID=10]
0x44b4bd0: i64,ch = CopyFromReg 0x44a12e0, 0x44b73b0 [ORD=2] [ID=7]
0x44b73b0: i64 = Register %vreg2 [ID=1]
0x44b5120: i64 = undef [ID=3]
0x44b74c0: v2f64 = bitcast 0x44b63a0 [ORD=3] [ID=12]
0x44b63a0: v4i32 = BUILD_VECTOR 0x44b6c20, 0x44b6c20, 0x44b6c20, 0x44b6c20 [ORD=3] [ID=9]
0x44b6c20: i32 = Constant<0> [ID=6]
0x44b6c20: i32 = Constant<0> [ID=6]
0x44b6c20: i32 = Constant<0> [ID=6]
0x44b6c20: i32 = Constant<0> [ID=6]
In function: mov01

@arsenm
Copy link
Contributor

arsenm commented Jan 27, 2015

I don't think this is an entirely reasonable goal. DAGCombiner performs various canonicalizations the targets rely on, and being able to disable it increases the complexity they will need to deal with. There isn't really a way to have separate phases with the current DAG, so these aren't cleanly separated from "real" optimizations.

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

No branches or pull requests

2 participants