File tree 1 file changed +4
-4
lines changed
llvm/lib/Transforms/Vectorize
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4871,10 +4871,10 @@ bool LoopVectorizationPlanner::isMoreProfitable(
4871
4871
// Assume vscale may be larger than 1 (or the value being tuned for),
4872
4872
// so that scalable vectorization is slightly favorable over fixed-width
4873
4873
// vectorization.
4874
- bool AXorBScalable = A.Width .isScalable () ^ B.Width .isScalable ();
4875
- auto CmpFn = [AXorBScalable ](const InstructionCost &LHS,
4876
- const InstructionCost &RHS) {
4877
- return AXorBScalable ? LHS <= RHS : LHS < RHS;
4874
+ bool PreferScalable = A.Width .isScalable () && ! B.Width .isScalable ();
4875
+ auto CmpFn = [PreferScalable ](const InstructionCost &LHS,
4876
+ const InstructionCost &RHS) {
4877
+ return PreferScalable ? LHS <= RHS : LHS < RHS;
4878
4878
};
4879
4879
4880
4880
// To avoid the need for FP division:
You can’t perform that action at this time.
0 commit comments