[llvm-bugs] [Bug 42380] New: early-cse is triggering lint "call argument type mismatched callee parameter type"
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jun 25 00:56:44 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42380
Bug ID: 42380
Summary: early-cse is triggering lint "call argument type
mismatched callee parameter type"
Product: new-bugs
Version: 8.0
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: pnkfelix at pnkfx.org
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
Created attachment 22136
--> https://bugs.llvm.org/attachment.cgi?id=22136&action=edit
.ll input to feed to -early-cse -lint passes.
The following .ll file when fed into the early-cse optimization, will cause the
lint pass to signal an error, "call argument type mismatched callee parameter
type"
.ll file is attached; it is also available here:
https://gist.github.com/pnkfelix/8df4508294069f1e5963c5fac7f8f825
This is spawned off of Rust bug https://github.com/rust-lang/rust/issues/48310
I do not know enough about the guarantees of the early-cse optimization nor of
the lint system to say whether this is definitively a bug in early-cse, or if
it is a bug in the lint. (One of my fellow Rust developers said it looked like
a bug in the lint, but that was, I think, based on their analysis of the .ll
file prior to LLVM's optimization passes.)
Steps to Reproduce:
1. Download .ll file, named `narrowed-48310.ll`
2. Run `opt -early-cse -lint narrowed-48310.ll`
Illustration:
% ./build/x86_64-unknown-linux-gnu/llvm/bin/opt -early-cse -lint -o /dev/null
narrowed-48310.ll
Undefined behavior: Call argument type mismatches callee parameter type
invoke void bitcast (void (%Bar*)*
@"_ZN59_$LT$narrowed_48310..Bar$u20$as$u20$narrowed_48310..Foo$GT$6borrow17hdd495dfcc8d99ffcE"
to void ({}*)*)({}* align 1 %9)
to label %bb3 unwind label %cleanup
%
(Note that above lint does not trigger without early-cse, as illustrated by the
below variant of the above command.)
% ./build/x86_64-unknown-linux-gnu/llvm/bin/opt -lint -o /dev/null
narrowed-48310.ll
%
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190625/c54f7a95/attachment.html>
More information about the llvm-bugs
mailing list