[PATCH] D122471: [IR] Require intrinsic struct return type to be anonymous
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 25 03:42:51 PDT 2022
nikic added inline comments.
================
Comment at: llvm/lib/IR/AutoUpgrade.cpp:591
- return true;
- }
static const Regex vstRegex("^arm\\.neon\\.vst([1234]|[234]lane)\\.v[a-z0-9]*$");
----------------
This is a remangling upgrade, but previously was done manually to preserve the named struct type. Now we should use the generic code.
================
Comment at: llvm/lib/IR/Function.cpp:1487
+ return false;
+ }
return matchIntrinsicType(PT->getNonOpaquePointerElementType(), Infos,
----------------
This is a bit of an ugly edge case, because "externref" type used by some wasm intrinsic is defined as pointer to empty struct, where "empty struct" is a named type in practice. I didn't bother handling this case, because this edge-case will go away with opaque pointers anyway, and as such doesn't seem worth addressing with additional machinery right now.
================
Comment at: llvm/test/CodeGen/X86/2009-04-12-FastIselOverflowCrash.ll:8
-declare %0 @llvm.sadd.with.overflow.i32(i32, i32) nounwind
+declare { i32, i1 } @llvm.sadd.with.overflow.i32(i32, i32) nounwind
----------------
The auto-upgrade does work fine for these tests, but they are testing FastISel and the resulting extract+insert+extract sequence is not supported by FastISel.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122471/new/
https://reviews.llvm.org/D122471
More information about the llvm-commits
mailing list