[PATCH] D119967: [InstCombineCalls] Optimize call of bitcast even w/ parameter attributes

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 12:50:33 PST 2022


nikic added a comment.

I'm not convinced this is right when there are ABI affecting attributes involved. Consider the first example, where `zeroext` is dropped. Let's hypothetically assume that this indicates a zeroext up to 64-bit, but we have 32-bit pointers. Doing the transform and dropping the zeroext means that the top bits will be left uninitialized now.

For non-ABI attributes, I agree that just dropping them is fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119967



More information about the llvm-commits mailing list