[PATCH] D98152: [InstCombine] Canonicalize SPF to min/max intrinsics
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 28 10:45:47 PDT 2021
spatel added inline comments.
================
Comment at: llvm/test/Transforms/PhaseOrdering/minmax.ll:23
+; CHECK-NEXT: [[SUB39:%.*]] = sub i8 [[SUB6]], [[K_0]]
+; CHECK-NEXT: call void @use(i8 [[SUB31]], i8 [[SUB35]], i8 [[SUB39]], i8 [[K_0]])
; CHECK-NEXT: ret void
----------------
spatel wrote:
> RKSimon wrote:
> > Any ideas whats causing this code bloat?
> We probably need to implement some reassociation folds for the intrinsics like instcombine's factorizeMinMaxTree():
> https://github.com/llvm/llvm-project/blob/da55af7f1d348c133774d8e8117d60462363fef5/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp#L2222
>
> D88287 might also help, but NaryReassociate isn't in the default optimization pipeline?
Should be helped by:
01ae6e5ead64
...but still need to adapt at least 1 more fold and/or analysis to recognize intrinsics.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98152/new/
https://reviews.llvm.org/D98152
More information about the llvm-commits
mailing list