Fix build with LLVM 3.2 and generic-4 / examples/sse4.h target.

This commit is contained in:
Matt Pharr
2013-08-09 19:56:43 -07:00
parent 0c5742b6f8
commit 7ab4c5391c
2 changed files with 6 additions and 6 deletions

View File

@@ -2532,7 +2532,7 @@ static FORCEINLINE int16_t __reduce_add_int8(__vec4_i8 v) {
// TODO: improve
int16_t ret = 0;
for (int i = 0; i < 4; ++i)
ret += v.v[i];
ret += __extract_element(v, i);
return ret;
}
@@ -2540,7 +2540,7 @@ static FORCEINLINE int32_t __reduce_add_int16(__vec4_i16 v) {
// TODO: improve
int32_t ret = 0;
for (int i = 0; i < 4; ++i)
ret += v.v[i];
ret += __extract_element(v, i);
return ret;
}

View File

@@ -4556,7 +4556,7 @@ PeepholePass::PeepholePass()
: BasicBlockPass(ID) {
}
#ifndef LLVM_3_1
#if !defined(LLVM_3_1) && !defined(LLVM_3_2)
using namespace llvm::PatternMatch;
@@ -4877,7 +4877,7 @@ lMatchAvgDownInt16(llvm::Value *inst) {
}
return NULL;
}
#endif // !LLVM_3_1
#endif // !LLVM_3_1 && !LLVM_3_2
bool
PeepholePass::runOnBasicBlock(llvm::BasicBlock &bb) {
@@ -4889,7 +4889,7 @@ PeepholePass::runOnBasicBlock(llvm::BasicBlock &bb) {
llvm::Instruction *inst = &*iter;
llvm::Instruction *builtinCall = NULL;
#ifndef LLVM_3_1
#if !defined(LLVM_3_1) && !defined(LLVM_3_2)
if (!builtinCall)
builtinCall = lMatchAvgUpUInt8(inst);
if (!builtinCall)
@@ -4906,7 +4906,7 @@ PeepholePass::runOnBasicBlock(llvm::BasicBlock &bb) {
builtinCall = lMatchAvgDownInt8(inst);
if (!builtinCall)
builtinCall = lMatchAvgDownInt16(inst);
#endif // LLVM_3_1
#endif // !LLVM_3_1 && !LLVM_3_2
if (builtinCall != NULL) {
llvm::ReplaceInstWithInst(inst, builtinCall);
modifiedAny = true;