[PATCH] D90723: [AArch64][GlobalISel] Select G_SELECT cc, t, (G_SUB 0, x) -> CSNEG t, x, cc
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 12 18:03:17 PST 2020
- Previous message: [PATCH] D90723: [AArch64][GlobalISel] Select G_SELECT cc, t, (G_SUB 0, x) -> CSNEG t, x, cc
- Next message: [PATCH] D90723: [AArch64][GlobalISel] Select G_SELECT cc, t, (G_SUB 0, x) -> CSNEG t, x, cc
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
paquette added inline comments.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp:1028
+ auto MaybeZero =
+ getConstantVRegValWithLookThrough(Sub->getOperand(1).getReg(), MRI);
+ if (!MaybeZero || MaybeZero->Value != 0)
----------------
aemerson wrote:
> I committed a patch to recognize a negate idiom for G_PTR_ADD in ad376657c1ec4da950d18b37b523585ccd4fc7bb, maybe you can re-use that as a helper, or just copy the MI PatternMatch code since its only a few lines.
How about something like D91397?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90723/new/
https://reviews.llvm.org/D90723
- Previous message: [PATCH] D90723: [AArch64][GlobalISel] Select G_SELECT cc, t, (G_SUB 0, x) -> CSNEG t, x, cc
- Next message: [PATCH] D90723: [AArch64][GlobalISel] Select G_SELECT cc, t, (G_SUB 0, x) -> CSNEG t, x, cc
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list