[PATCH] D99171: [WebAssembly] Fold xor by inverting branch target
Sam Parker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 23 07:19:53 PDT 2021
samparker added inline comments.
================
Comment at: llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td:33
(BR_UNLESS bb_op:$dst, I32:$cond)>;
+def : Pat<(brcond (i32 (xor I32:$cond, (i32 1))), bb:$dst),
+ (BR_UNLESS bb_op:$dst, I32:$cond)>;
----------------
Ah, I've remembered that I thought I should check that the incoming I32 is indeed a boolean value.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99171/new/
https://reviews.llvm.org/D99171
More information about the llvm-commits
mailing list