SelectionDAG: Teach FoldConstantArithmetic how to deal with vectors.
This required disabling a PowerPC optimization that did the following: input: x = BUILD_VECTOR <i32 16, i32 16, i32 16, i32 16> lowered to: tmp = BUILD_VECTOR <i32 8, i32 8, i32 8, i32 8> x = ADD tmp, tmp The add now gets folded immediately and we're back at the BUILD_VECTOR we started from. I don't see a way to fix this currently so I left it disabled for now. Fix some trivially foldable X86 tests too. llvm-svn: 174325
Showing
- llvm/include/llvm/CodeGen/SelectionDAG.h 2 additions, 4 deletionsllvm/include/llvm/CodeGen/SelectionDAG.h
- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp 115 additions, 44 deletionsllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
- llvm/lib/Target/PowerPC/PPCISelLowering.cpp 5 additions, 0 deletionsllvm/lib/Target/PowerPC/PPCISelLowering.cpp
- llvm/test/CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll 1 addition, 0 deletionsllvm/test/CodeGen/PowerPC/2008-07-10-SplatMiscompile.ll
- llvm/test/CodeGen/X86/2011-11-30-or.ll 2 additions, 2 deletionsllvm/test/CodeGen/X86/2011-11-30-or.ll
- llvm/test/CodeGen/X86/blend-msb.ll 4 additions, 2 deletionsllvm/test/CodeGen/X86/blend-msb.ll
- llvm/test/CodeGen/X86/vector-gep.ll 0 additions, 3 deletionsllvm/test/CodeGen/X86/vector-gep.ll
Loading
Please register or sign in to comment