LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 36369 - Chromium aarch64 builds fail with "Cannot select: t33: f64 = AArch64ISD::FMOV Constant:i32<0>"
Summary: Chromium aarch64 builds fail with "Cannot select: t33: f64 = AArch64ISD::FMOV...
Status: RESOLVED FIXED
Alias: None
Product: new-bugs
Classification: Unclassified
Component: new bugs (show other bugs)
Version: trunk
Hardware: PC Linux
: P enhancement
Assignee: Evandro Menezes
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-13 10:07 PST by Hans Wennborg
Modified: 2018-02-20 00:53 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
preprocessed repro (249.14 KB, application/gzip)
2018-02-16 05:05 PST, Hans Wennborg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Wennborg 2018-02-13 10:07:04 PST
See https://bugs.chromium.org/p/chromium/issues/detail?id=811767#c1 for reproducer.
Comment 1 Hans Wennborg 2018-02-13 10:07:53 PST
Bisection points to this one:

---
Author: evandro
Date: Mon Feb 12 08:41:41 2018
New Revision: 324903

URL: http://llvm.org/viewvc/llvm-project?rev=324903&view=rev
Log:
[AArch64] Refactor identification of SIMD immediates

Get rid of icky goto loops and make the code easier to maintain (NFC).

Differential revision: https://reviews.llvm.org/D42723

Modified:
    llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp
---
Comment 2 Hans Wennborg 2018-02-13 10:15:15 PST
Reverted in r325034 in the meantime
Comment 3 Evandro Menezes 2018-02-13 12:57:18 PST
Would it be possible to attach a preprocessed version of the offending code, please?
Comment 4 Hans Wennborg 2018-02-14 00:36:11 PST
(In reply to Evandro Menezes from comment #3)
> Would it be possible to attach a preprocessed version of the offending code,
> please?

It was too large to attach here directly, so I added it to
 https://bugs.chromium.org/p/chromium/issues/detail?id=811767#c1 which I linked to above.
Comment 5 Evandro Menezes 2018-02-15 08:44:16 PST
That file doesn't seem to be the preprocessed output that results when the -E option is specified.  I'm still getting too many compilation errors and cannot confirm the fix for it.  Please, attach the .i file to the Chromium bug as well.
Comment 6 Evandro Menezes 2018-02-15 17:28:54 PST
Posted fix for review at https://reviews.llvm.org/D42133
Comment 7 Hans Wennborg 2018-02-16 05:05:47 PST
Created attachment 19881 [details]
preprocessed repro

(In reply to Evandro Menezes from comment #5)
> That file doesn't seem to be the preprocessed output that results when the
> -E option is specified.  I'm still getting too many compilation errors and
> cannot confirm the fix for it.  Please, attach the .i file to the Chromium
> bug as well.

It's the reproducer created by clang when it crashed. I think that means it's got all the #include files pulled in, but it still has other preprocessor directives.

Attaching a preprocessed version which shows the error when invoked as:

$ clang -cc1 -triple aarch64--linux-android -emit-obj -target-cpu generic -target-feature +neon -target-abi aapcs  -Oz -std=gnu++14 -vectorize-slp -x c++ /tmp/a.ii
Comment 8 Hans Wennborg 2018-02-16 05:08:39 PST
(In reply to Evandro Menezes from comment #6)
> Posted fix for review at https://reviews.llvm.org/D42133

I applied this on top of r324903 but still get the same error using the repro in #c7.
Comment 9 Hans Wennborg 2018-02-16 05:12:56 PST
(In reply to Hans Wennborg from comment #8)
> (In reply to Evandro Menezes from comment #6)
> > Posted fix for review at https://reviews.llvm.org/D42133
> 
> I applied this on top of r324903 but still get the same error using the
> repro in #c7.

Oh, or did you mean https://reviews.llvm.org/D43364 ?

I applied this too, but still get the same failure.
Comment 10 Evandro Menezes 2018-02-16 09:04:03 PST
Got it narrowed down to:

define void @v2i32st(<2 x i32>* %p) nounwind {
  store <2 x i32> <i32 0, i32 1073741824>, <2 x i32>* %p, align 8
  ret void
}

Thank you!
Comment 11 Evandro Menezes 2018-02-16 12:00:22 PST
Please, confirm solution in https://reviews.llvm.org/D43364.

Thank you.
Comment 12 Hans Wennborg 2018-02-19 03:21:54 PST
(In reply to Evandro Menezes from comment #11)
> Please, confirm solution in https://reviews.llvm.org/D43364.

Yes, that seems to work.
Comment 13 Evandro Menezes 2018-02-19 08:32:04 PST
I'd appreciate if you could review the patch too.  Thanks for confirming this bug fixed.
Comment 14 Hans Wennborg 2018-02-20 00:53:07 PST
(In reply to Evandro Menezes from comment #13)
> I'd appreciate if you could review the patch too.  Thanks for confirming
> this bug fixed.

Sorry, I don't know anything about aarch64 isel, so I'm not a good reviewer for this.