[PATCH] D38611: Fix X86 regression on linpack

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 12:41:21 PDT 2017


qcolombet added inline comments.


================
Comment at: lib/Target/X86/X86TargetTransformInfo.cpp:2473
+    unsigned C1Insns = C1.Insns + (C1.FoldedAddress >> 3);
+    unsigned C2Insns = C2.Insns + (C2.FoldedAddress >> 3);
+    return std::tie(C1Insns, C1.NumRegs, C1.AddRecCost,
----------------
Could you add a comment explaining the `>> 3`?

It does not make sense to count folded addresses as additional instructions on its own and the `>> 3` makes it even more cryptic why we do that :).


================
Comment at: test/Transforms/LoopStrengthReduce/X86/folded_addresses.ll:7
+
+; Function Attrs: norecurse nounwind uwtable
+define void @foo(i32, float, float* noalias nocapture readonly, float* noalias nocapture) local_unnamed_addr #0 {
----------------
Could you add a description of what are the key things this function have and explain what they exercise in LSR?


================
Comment at: test/Transforms/LoopStrengthReduce/X86/folded_addresses.ll:8
+; Function Attrs: norecurse nounwind uwtable
+define void @foo(i32, float, float* noalias nocapture readonly, float* noalias nocapture) local_unnamed_addr #0 {
+; CHECK-LABEL: @foo(
----------------
Could you use `opt -instnamer` on the input test?


Repository:
  rL LLVM

https://reviews.llvm.org/D38611





More information about the llvm-commits mailing list