[PATCH] D131757: [instcombine] Check for zero initialisation optimisation of a product given fast flags are enabled in clang.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 12 08:12:55 PDT 2022
fhahn added a comment.
I think the title/description needs updating to make clear this just adds tests.
> [instcombine] Check for zero initialisation optimisation of a product given fast flags are enabled in clang.
Also it's not really Clang related, as this is a generic IR optimization, so it is best to drop the reference to Clang from the title.
================
Comment at: llvm/test/Transforms/InstCombine/remove-loop-phi-fastmul.ll:21
+entry:
+ %arr_d = alloca [1000 x double], align 8
+ br label %for.body
----------------
Could you pass this as an argument to the tests to avoid reading memory that's not initialized?
================
Comment at: llvm/test/Transforms/InstCombine/remove-loop-phi-fastmul.ll:166
+ %arr_d = alloca [1000 x double], align 8
+ %entry_val = fmul fast double 1.0, 0.0
+ br label %for.body
----------------
I think it would be better to pass this value as argument.
================
Comment at: llvm/test/Transforms/InstCombine/remove-loop-phi-fastmul.ll:241
+ %arr_d = alloca [1000 x double], align 8
+ %entry_cond = icmp ult i32 0, 0
+ br i1 %entry_cond, label %for.body, label %entry_2
----------------
I think it would be better to pass this condition as argument rather than having a trivial comparison.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131757/new/
https://reviews.llvm.org/D131757
More information about the llvm-commits
mailing list