AVX bugfix: when replacing 'all on' masked store with a store,

the rvalue is operand 2, not operand 1 (which is the mask!)
This commit is contained in:
Matt Pharr
2011-08-31 18:06:29 -07:00
parent e144724979
commit f65a20c700

View File

@@ -630,7 +630,7 @@ IntrinsicsOpt::runOnBasicBlock(llvm::BasicBlock &bb) {
}
else if (mask == 0xff) {
// all lanes storing, so replace with a regular store
llvm::Value *rvalue = callInst->getArgOperand(1);
llvm::Value *rvalue = callInst->getArgOperand(2);
llvm::Type *storeType = rvalue->getType();
llvm::Value *castPtr =
new llvm::BitCastInst(callInst->getArgOperand(0),