In working on chaning llvm.memcpy’s i1 isVolatile
parm to an i8 volatileflags
operand, I noticed the following apparent inconsistency.
- one testcase (llvm/test/Transforms/Attributor/value-simplify.l) declares ‘@llvm.memcpy(p0, p0, i32, i1)’, and has it recognized as the intrinsic
- llvm/lib/IR/AutoUpdater.cpp recognizes the functions to update by looking at the name (not any intrinsic ID), and requires a ‘.’ after the name. For instance (after skipping the
llvm.
prefix)Name.startswith("memcpy.")
.
Currently not upgrading plain llvm.memcpy is ok, as the declaration is correct. But changing the final parm from i1 to i8 makes this significant.
There seems to be an inconsistency in how the LLVM IR parser (at least) recognizes intrinics and how the auto updater checks for them. Should the parser be more restrictive, or should the auto updater be less restrictive? In either case, should the testcase be changed?