[all-commits] [llvm/llvm-project] 1b0400: [X86] combineSubABS - handle NEG(ABD()) expanded p...
Simon Pilgrim via All-commits
all-commits at lists.llvm.org
Wed Sep 11 05:19:24 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1b0400eed8613108d9f293b9ddd3380e3241ac60
https://github.com/llvm/llvm-project/commit/1b0400eed8613108d9f293b9ddd3380e3241ac60
Author: Simon Pilgrim <llvm-dev at redking.me.uk>
Date: 2024-09-11 (Wed, 11 Sep 2024)
Changed paths:
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/test/CodeGen/X86/abds-neg.ll
M llvm/test/CodeGen/X86/abdu-neg.ll
Log Message:
-----------
[X86] combineSubABS - handle NEG(ABD()) expanded patterns
combineSubABS already handles the "(sub Y, cmovns X, -X) -> (add Y, cmovns -X, X)" fold by flipping the cmov operands.
We can do something similar for the negation of ABDS/U patterns which have been expanded to a CMOVL/CMOVB with a pair of commuted subtractions: "NEG(ABD(X,Y)) -> NEG(CMOV(SUB(X,Y),SUB(Y,X))) -> CMOV(SUB(Y,X),SUB(X,Y))"
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list