[PATCH] D149842: Scalarizer: limit scalarization for small element types

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 06:21:32 PDT 2023


nhaehnle added inline comments.


================
Comment at: llvm/test/Transforms/Scalarizer/basic-inseltpoison.ll:11
 ; CHECK-NEXT:  entry:
-; CHECK-NEXT:    [[INIT_I0:%.*]] = extractelement <4 x float> [[INIT:%.*]], i32 0
-; CHECK-NEXT:    [[INIT_I1:%.*]] = extractelement <4 x float> [[INIT]], i32 1
-; CHECK-NEXT:    [[INIT_I2:%.*]] = extractelement <4 x float> [[INIT]], i32 2
-; CHECK-NEXT:    [[INIT_I3:%.*]] = extractelement <4 x float> [[INIT]], i32 3
+; CHECK-NEXT:    [[INIT_I0:%.*]] = extractelement <4 x float> [[INIT:%.*]], i64 0
+; CHECK-NEXT:    [[INIT_I1:%.*]] = extractelement <4 x float> [[INIT]], i64 1
----------------
fhahn wrote:
> Would it be possible to split off the type change `i32` -> `i64` to reduce the diff?
I'll see what I can do.


================
Comment at: llvm/test/Transforms/Scalarizer/min-bits.ll:2
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt %s -passes='function(scalarizer,dce)' -scalarize-load-store -S | FileCheck %s --check-prefixes=CHECK,MIN_LE16,DEFAULT
+; RUN: opt %s -passes='function(scalarizer,dce)' -scalarize-load-store -scalarize-min-bits=16 -S | FileCheck %s --check-prefixes=CHECK,MIN_LE16,MIN_GE16
----------------
fhahn wrote:
> Those are the main tests for the new functionality, right? Would it be possible to pre-commit those and then just show the diff here without the new flag?
Yes, these are the main tests. The intention was to show both versions side-by-side with different prefixes, but I can also go the precommit route.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149842



More information about the llvm-commits mailing list