[llvm-dev] IRBuilder input debug
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Thu Jun 13 05:09:44 PDT 2019
Hi Norbert,
On Wed, 12 Jun 2019 at 23:53, Winter Claus via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Currently I am using IRBuilder to create a module, and I encountered an error, which I cannot trace back to the IRBuilder related call, which caused the error:
> "Instruction does not dominate all uses!
> %14 = load i32, i32* @r6
> %11 = trunc i32 %14 to i8
> LLVM ERROR: Broken function found, compilation aborted!"
>
> This description is too losely specified for me to know, where the causing code is located. Getting 20 lines instead of 2 would help. Getting additional info of the broken function could also help. How can this be solved?
This looks like an error in the Verifier. I often find them a bit
terse too, but I don't think there's a command-line option to
automatically be more verbose on an error. I tend to set a breakpoint
in "CheckFailed" and go up a few stack levels. That usually lets you
dump the function or module that's causing problems.
Alternatively, you might dump your functions just after creating them
and look for truncs & loads with those operands.
Cheers.
Tim.
More information about the llvm-dev
mailing list