| OLD | NEW |
| 1 //===- ExpandShuffleVector.cpp - shufflevector to {insert/extract}element -===// | 1 //===- ExpandShuffleVector.cpp - shufflevector to {insert/extract}element -===// |
| 2 // | 2 // |
| 3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
| 4 // | 4 // |
| 5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
| 7 // | 7 // |
| 8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
| 9 // | 9 // |
| 10 // Replace all shufflevector instructions by insertelement / | 10 // Replace all shufflevector instructions by insertelement / |
| 11 // extractelement. InstCombine should be able to reconstruct the | 11 // extractelement. CombineVectorInstructions is able to reconstruct the |
| 12 // shufflevector, | 12 // shufflevector. |
| 13 // | 13 // |
| 14 //===----------------------------------------------------------------------===// | 14 //===----------------------------------------------------------------------===// |
| 15 | 15 |
| 16 #include "llvm/IR/BasicBlock.h" | 16 #include "llvm/IR/BasicBlock.h" |
| 17 #include "llvm/IR/Constants.h" | 17 #include "llvm/IR/Constants.h" |
| 18 #include "llvm/IR/IRBuilder.h" | 18 #include "llvm/IR/IRBuilder.h" |
| 19 #include "llvm/IR/Instruction.h" | 19 #include "llvm/IR/Instruction.h" |
| 20 #include "llvm/IR/Instructions.h" | 20 #include "llvm/IR/Instructions.h" |
| 21 #include "llvm/IR/Module.h" | 21 #include "llvm/IR/Module.h" |
| 22 #include "llvm/IR/Type.h" | 22 #include "llvm/IR/Type.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 for (Instructions::iterator S = Shufs.begin(), E = Shufs.end(); S != E; ++S) | 100 for (Instructions::iterator S = Shufs.begin(), E = Shufs.end(); S != E; ++S) |
| 101 Expand(*S, Int32); | 101 Expand(*S, Int32); |
| 102 | 102 |
| 103 return !Shufs.empty(); | 103 return !Shufs.empty(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 BasicBlockPass *llvm::createExpandShuffleVectorPass() { | 106 BasicBlockPass *llvm::createExpandShuffleVectorPass() { |
| 107 return new ExpandShuffleVector(); | 107 return new ExpandShuffleVector(); |
| 108 } | 108 } |
| OLD | NEW |