[PATCH] D97756: [LoopUnswitch] unswitch if cond is in select form of and/or as well
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 09:26:21 PST 2021
nikic added inline comments.
================
Comment at: llvm/test/Transforms/SimpleLoopUnswitch/nontrivial-unswitch.ll:4212
+; CHECK-NEXT: entry:
+; CHECK-NEXT: %[[INV_AND:.*]] = and i1 %cond2, %cond1
+; CHECK-NEXT: br i1 %[[INV_AND]], label %entry.split, label %entry.split.us
----------------
This doesn't look safe. Previously, if `%v1` is false then `%cond1` is not used. Now we unconditionally branch on `%cond1`.
Or is the logic here that unswitching requires insertion of `freeze` for normal and/or anyway, and we leave this as a miscompile until that is resolved?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97756/new/
https://reviews.llvm.org/D97756
More information about the llvm-commits
mailing list