-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Hexagon] Only handle simple types memory accesses (#120654)
The code was asserting because allowsMemoryAccess() was called with Extended Value Type INVALID_SIMPLE_VALUE_TYPE in HexagonISelLowering.cpp. Fixes #118881 (cherry picked from commit 8177bf5)
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 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,22 @@ | ||
; RUN: llc -march=hexagon < %s | ||
; REQUIRES: asserts | ||
|
||
; Only simple types memory accesses are handled. | ||
|
||
target triple = "hexagon" | ||
|
||
%struct.hoge = type { i320 } | ||
|
||
define dso_local void @widget() { | ||
bb: | ||
%tmp = alloca %struct.hoge, align 1 | ||
%tmp1 = bitcast %struct.hoge* %tmp to i320* | ||
%tmp2 = load i320, i320* %tmp1, align 1 | ||
%tmp3 = and i320 %tmp2, -18446744073709551616 | ||
%tmp4 = or i320 %tmp3, 0 | ||
store i320 %tmp4, i320* %tmp1, align 1 | ||
call void @llvm.trap() | ||
unreachable | ||
} | ||
|
||
declare void @llvm.trap() |