[PATCH] D107453: [SVE] Add folds for truncation of vscale
Sander de Smalen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 4 07:19:46 PDT 2021
sdesmalen added inline comments.
================
Comment at: llvm/test/Transforms/InstCombine/vscale_trunc.ll:4
+
+define i32 @vscale_trunc_i64toi32() #0 {
+; CHECK-LABEL: @vscale_trunc_i64toi32(
----------------
This test isn't really necessary, if you handle the case for i32 -> i8 for the two edge cases.
================
Comment at: llvm/test/Transforms/InstCombine/vscale_trunc.ll:15
+
+define i8 @vscale_SExt_i32toi8() #0 {
+; CHECK-LABEL: @vscale_SExt_i32toi8(
----------------
Three things:
1. Please inline the vscale attribute here, that makes the test more more readable.
2. Please test the edge cases:
``` vscale_range(0, 256) // can't fold.
vscale_range(0, 255) // can be folded.```
3. This name seems wrong: `vscale_SExt_i32toi8`? (same for the use of `SExt` in the test below)
================
Comment at: llvm/test/Transforms/InstCombine/vscale_trunc.ll:27
+
+define i8 @vscale_SExt_i32toi8_poison() vscale_range(0, 1024) {
+; CHECK-LABEL: @vscale_SExt_i32toi8_poison(
----------------
This test isn't really necessary, if you handle the case for i32 -> i8 for the two edge cases.
================
Comment at: llvm/test/Transforms/InstCombine/vscale_trunc.ll:38
+}
+
+attributes #0 = { vscale_range(0, 16) }
----------------
I'm missing a test for the case where there is no attribute specified.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107453/new/
https://reviews.llvm.org/D107453
More information about the llvm-commits
mailing list