[PATCH] D54515: [ARM] Replace trunc for switch as a sink

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 14 01:21:19 PST 2018


SjoerdMeijer added a comment.

Just a very quick first pass....some nitpicks:

I think it might be useful to add this as comments somewhere:

> This leaves sinks as being:
> 
> - points where the value in the register is being observed, such as an icmp, switch or store.
> - points where value types have to match, such as calls and returns.
> - zext are included to ease the transformation and are generally removed later on.



================
Comment at: lib/Target/ARM/ARMCodeGenPrepare.cpp:222
 /// Return true if the given value is a source in the use-def chain, producing
 /// a narrow (i8, i16) value. These values will be zext to start the promotion
 /// of the tree to i32. We guarantee that these won't populate the upper bits
----------------
Things have evolved a bit... I think i8 and i16 used to be hardcoded constants here. Perhaps now more correct is to say `TypeSize`?


https://reviews.llvm.org/D54515





More information about the llvm-commits mailing list