[PATCH] D86383: [GlobalISel] Fold xor(cmp(pred, _, _), 1) -> cmp(inverse(pred), _, _)
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 21 16:17:54 PDT 2020
- Previous message: [PATCH] D86383: [GlobalISel] Fold xor(cmp(pred, _, _), 1) -> cmp(inverse(pred), _, _)
- Next message: [PATCH] D86383: [GlobalISel] Fold xor(cmp(pred, _, _), 1) -> cmp(inverse(pred), _, _)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:1988-1994
+ if (!mi_match(
+ MI.getOperand(0).getReg(), MRI,
+ m_all_of(m_SpecificType(I1), m_GXor(m_Reg(XorSrc), m_ICst(Cst)))))
+ return false;
+ // The i1 true is be represented as a -1 as a sign-extended constant.
+ if (Cst != -1)
+ return false;
----------------
Can generalize for not-i1 by checking the target boolean contents
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86383/new/
https://reviews.llvm.org/D86383
- Previous message: [PATCH] D86383: [GlobalISel] Fold xor(cmp(pred, _, _), 1) -> cmp(inverse(pred), _, _)
- Next message: [PATCH] D86383: [GlobalISel] Fold xor(cmp(pred, _, _), 1) -> cmp(inverse(pred), _, _)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the llvm-commits
mailing list