forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AArch64] PR28877: Don't assume we're running after legalization when…
… creating vcvtfp2fxs Summary: The DAG combine transformation that was generating the aarch64_neon_vcvtfp2fxs node was assuming that all inputs where legal and wasn't accounting that the input could be a v4f64 if we're trying to do the transformation before legalization. We now bail out in this case. All illegal types besides v4f64 were already rejected. Fixes https://llvm.org/bugs/show_bug.cgi?id=28877. Reviewers: jmolloy Subscribers: aemerson, rengolin, llvm-commits Differential Revision: https://reviews.llvm.org/D23261 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278002 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
1 parent
7dd6fd6
commit 1eae80e
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
; RUN: llc < %s -mtriple=aarch64-linux-eabi -o - | FileCheck %s | ||
|
||
%struct.a= type { i64, i64, i64, i64 } | ||
|
||
; DAG combine will try to perform a transformation that creates a vcvtfp2fxs | ||
; with a v4f64 input. Since v4i64 is not legal we should bail out. We can | ||
; pottentially still create the vcvtfp2fxs node after legalization (but on a | ||
; v2f64). | ||
|
||
; CHECK-LABEL: fun1 | ||
define void @fun1() local_unnamed_addr { | ||
entry: | ||
%mul = fmul <4 x double> zeroinitializer, <double 6.553600e+04, double 6.553600e+04, double 6.553600e+04, double 6.553600e+04> | ||
%toi = fptosi <4 x double> %mul to <4 x i64> | ||
%ptr = getelementptr inbounds %struct.a, %struct.a* undef, i64 0, i32 2 | ||
%elem = extractelement <4 x i64> %toi, i32 1 | ||
store i64 %elem, i64* %ptr, align 8 | ||
call void @llvm.trap() | ||
unreachable | ||
} | ||
|
||
; Function Attrs: noreturn nounwind | ||
declare void @llvm.trap() | ||
|