[llvm-dev] In ISel, where Constant<0> comes from?
Gleb Popov via llvm-dev
llvm-dev at lists.llvm.org
Tue Dec 18 02:36:18 PST 2018
On Tue, Dec 18, 2018 at 2:21 PM Tim Northover <t.p.northover at gmail.com>
> On Tue, 18 Dec 2018 at 09:41, Gleb Popov <6yearold at gmail.com> wrote:
> > Changing optimization level for Function main
> > Before: -O2 ; After: -O0
> > FastISel is enabled
> Ah, I think I can guess what's happening. I assume your 1.ll is
> Clang's output, and you used the default optimization level (which is
> That means your function is actually tagged as "optnone" and LLVM
> tries to use a different instruction selector called "FastISel" rather
> than create a DAG at all. This speeds up compilation and improve the
> debug experience, but not all targets support it. SPARC falls back to
> the DAG because FastISel can't handle the function, but x86 is getting
> through it ever creating a DAG.
> To see the X86 DAG you can either remove the "optnone" attribute from
> the .ll file or override the selector on the llc command-line:
You're absolutely right. Thanks a ton for your insights!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev