[PATCH] D132978: [IRTranslator] Using ZExt for extractelement indices.

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 02:51:08 PDT 2022


Petar.Avramovic added a comment.

I checked a few code size regressions and they look correct. Combines would replace extract/insert with undef because index was `i32  -1` or `i64 -1` (from `i1 true`). Now they extract/insert element at index 1.
My best guess how this bug was not discovered sooner is that frontends use i32/i64 for index type. 
Other type of regression is when i32 (marked as signed argument) has to be zero-extended to i64 (and with mask), before it used to be a copy. Considering langref changes it is probably more correct to mark index arguments as zeroext (index will be copied again no code size regression). But this should be checked with people who know more about specific targets.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132978



More information about the llvm-commits mailing list