On Tue, Jun 20, 2023 at 6:11 PM liuhongt via Gcc-patches wrote: > > I notice there's some refactor in vectorizable_conversion > for code_helper,so I've adjusted my patch to that. > Here's the patch I'm going to commit. > > We have already use intermidate type in case WIDEN, but not for NONE, > this patch extended that. > > gcc/ChangeLog: > > PR target/110018 > * tree-vect-stmts.cc (vectorizable_conversion): Use > intermiediate integer type for float_expr/fix_trunc_expr when > direct optab is not existed. > > gcc/testsuite/ChangeLog: > > * gcc.target/i386/pr110018-1.c: New test. > + > + /* For conversions between float and smaller integer types try whether we > + can use intermediate signed integer types to support the > + conversion. */ I'm trying to enhance testcase coverage with explicit signed/unsigned types (patch attached), and I have noticed that zero-extension is used for unsigned types. So, the above comment that mentions only signed integer types is not entirely correct. Uros.