[PATCH] D76283: [IRBuilder] Use preferred target type for len argument of memory intrinsic functions

Konstantin Schwarz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 17 09:05:29 PDT 2020


kschwarz added a comment.

Correct, it will still miscompile even with this change.
I see two options: either 1) extend GlobalISel to select to the appropriate type, or 2) declare this as illegal LLVM IR in the first place.

1. will introduce an implicit truncation of the i64 argument (same as SelectionDAG does today). In practice this seems to work, but it feels broken
2. I'm not sure whether it should be illegal to create an i64 version of the llvm.mem* intrinsics on 32-bit architectures.

Thoughts?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76283





More information about the llvm-commits mailing list