[PATCH] D137613: [TypePromotion] Replace Zext to Truncate for the case src bitwidth is larger

Sam Tebbs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 8 02:43:22 PST 2022


samtebbs added inline comments.


================
Comment at: llvm/lib/CodeGen/TypePromotion.cpp:582
+  // operands, so remove them.
+  // Some zexts need replace to truncate if src bitwidth is larger.
   for (auto *V : Visited) {
----------------
Small nit: "need replace to" to "need to be replaced with"


================
Comment at: llvm/test/Transforms/TypePromotion/AArch64/pr58843.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -type-promotion -verify -S %s -o - | FileCheck %s
----------------
Since this is a midend change I think a target-agnostic test would be better.


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

https://reviews.llvm.org/D137613



More information about the llvm-commits mailing list