[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 05:54:07 PST 2022


samtebbs added inline comments.


================
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
----------------
bcl5980 wrote:
> samtebbs wrote:
> > Since this is a midend change I think a target-agnostic test would be better.
> This pass need some target-dependent informations like `RegisterBitWidth`, `TLI->getTypeAction(*Ctx, SrcVT)`.
> And the crash can't  be reproduced on x86_64 and riscv64. So a target-agnostic test is a little tricky here I think.
OK that makes sense, I'm happy with this change with the two other minor changes suggested.


================
Comment at: llvm/test/Transforms/TypePromotion/AArch64/pr58843.ll:4
+target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
+target triple = "aarch64-unknown-linux-gnu"
+
----------------
It looks like other tests in this directory remove this line and instead add `-mtriple=aarch64` to the RUN line.


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

https://reviews.llvm.org/D137613



More information about the llvm-commits mailing list