[PATCH] D128877: [LoopCacheAnalysis] Fix a type mismatch bug in cost calculation

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 1 11:44:28 PDT 2022


Meinersbur added a comment.

@bjope I think you are correct. This is what the source code documentation says:

  /// Return a SCEV corresponding to a conversion of the input value to the
  /// specified type. If the type must be extended, it is extended with
  /// unspecified bits. The conversion must not be narrowing.
  const SCEV *getNoopOrAnyExtend(const SCEV *V, Type *Ty);

@congzhe `getAnyExtendExpr` has some heuristics for which kind of extension is better for some definition of "better", but that doesn't mean it will find the correct one every time. The test case you added contains `zext`. Shouldn't that somehow indicate that `zext` is to be used in this case?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128877/new/

https://reviews.llvm.org/D128877



More information about the llvm-commits mailing list