mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 16:24:23 +00:00
Fix a dagcombine optimization. The optimization attempts to optimize a bitcast of fneg to integers
by xoring the high-bit. This fails if the source operand is a vector because we need to negate each of the elements in the vector. Fix rdar://12281066 PR13813. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163802 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -5441,7 +5441,8 @@ SDValue DAGCombiner::visitBITCAST(SDNode *N) {
|
||||
// This often reduces constant pool loads.
|
||||
if (((N0.getOpcode() == ISD::FNEG && !TLI.isFNegFree(VT)) ||
|
||||
(N0.getOpcode() == ISD::FABS && !TLI.isFAbsFree(VT))) &&
|
||||
N0.getNode()->hasOneUse() && VT.isInteger() && !VT.isVector()) {
|
||||
N0.getNode()->hasOneUse() && VT.isInteger() &&
|
||||
!VT.isVector() && !N0.getValueType().isVector()) {
|
||||
SDValue NewConv = DAG.getNode(ISD::BITCAST, N0.getDebugLoc(), VT,
|
||||
N0.getOperand(0));
|
||||
AddToWorkList(NewConv.getNode());
|
||||
|
Reference in New Issue
Block a user