Skip to content

Assertion failed in codegen #9530

@llvmbot

Description

@llvmbot
Bugzilla Link 9158
Resolution FIXED
Resolved on Feb 11, 2011 13:58
Version trunk
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

; ModuleID = 'bugpoint-reduced-simplified.bc'
target triple = "x86_64-unknown-linux-gnu"

define fastcc void @​m_387() nounwind {
entry:
%0 = load <4 x float>* undef
%1 = load <4 x float>* null
%merge68 = select <4 x i1> undef, <4 x float> %0, <4 x float> %1
store <4 x float> %merge68, <4 x float> addrspace(1)* undef
ret void
}

The codegen has the following optimization: If we select between the result of two loads, then we can select between their pointers. However, this fails in the case of vector select (where the selector is a vector).

Index: DAGCombiner.cpp

--- DAGCombiner.cpp (revision 2788)
+++ DAGCombiner.cpp (working copy)
@@ -6581,6 +6581,9 @@
bool DAGCombiner::SimplifySelectOps(SDNode *TheSelect, SDValue LHS,
SDValue RHS) {

  • // Cannot simplify select with vector condition
  • if (TheSelect->getOperand(0).getValueType().isVector()) return false;
  • // If this is a select from two identical things, try to pull the operation
    // through the select.
    if (LHS.getOpcode() == RHS.getOpcode() && LHS.hasOneUse() && RHS.hasOneUse()){

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions