[PATCH] D85533: [InstCombine] Optimize select(freeze(icmp eq/ne x, y), x, y)
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 7 11:41:18 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/select.ll:2588
+ call void @use_i1_i32(i1 %c.fr, i32 %v)
+ ret void
+}
----------------
If I'm understanding correctly, the following transform would be legal:
```
define void @select_freeze_icmp_multuses(i32 %x, i32 %y) {
%x.fr = freeze i32 %x
%y.fr = freeze i32 %y
%c = icmp ne i32 %x.fr, %y.fr
call void @use_i1_i32(i1 %c, i32 %x.fr)
ret void
}
```
Is this something we should be looking into?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D85533/new/
https://reviews.llvm.org/D85533
More information about the llvm-commits
mailing list