Skip to content

Commit

Permalink
Don't try to fold saturating_sub of VectorReduce (#6896)
Browse files Browse the repository at this point in the history
don't fold saturating_sub of VectorReduce
  • Loading branch information
rootjalex authored Aug 1, 2022
1 parent e03b0e0 commit e35654b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CodeGen_LLVM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2832,7 +2832,7 @@ void CodeGen_LLVM::visit(const Call *op) {
internal_assert(op->args.size() == 2);

// Try to fold the vector reduce for a call to saturating_add
const bool folded = try_to_fold_vector_reduce<Call>(op->args[0], op->args[1]);
const bool folded = op->is_intrinsic(Call::saturating_add) && try_to_fold_vector_reduce<Call>(op->args[0], op->args[1]);

if (!folded) {
std::string intrin;
Expand Down

0 comments on commit e35654b

Please sign in to comment.