[PATCH] D108408: [InstCombine] Transform X == 0 ? 0 : X * Y --> X * freeze(Y).
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 21 05:39:56 PDT 2021
RKSimon added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/select.ll:2863
+
+define i32 @mul_by_zero1(i32 %x, i32 %y) {
+; CHECK-LABEL: @mul_by_zero1(
----------------
please can you not enumerate tests, and give them names that describe the purpose of the test - e.g. mul_select_eq_zero, mul_select_eq_zero_commute, mul_select_eq_zero_vector, mul_select_ne_zero
================
Comment at: llvm/test/Transforms/InstCombine/select.ll:2881
+;
+ %c = icmp eq i32 0, %x
+ %m = mul i32 %x, %y
----------------
I'm not sure this test does anything useful? instcombine will canonicalize the 0 to the RHS
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108408/new/
https://reviews.llvm.org/D108408
More information about the llvm-commits
mailing list