forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GlobalISel] Bail on G_PHI narrowing of odd types (PR48188)
The current narrowing code for G_PHI can only handle the case where the size is a multiple of the narrow size. If this is not the case, fall back to SDAG instead of asserting. Original patch by shepmaster. Differential Revision: https://reviews.llvm.org/D92446
- Loading branch information
Showing
2 changed files
with
32 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,27 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc -O0 -mtriple=aarch64-unknown-linux-gnu < %s | FileCheck %s | ||
|
||
; GlobalISel cannot legalize this phi, so we fall back to SDAG. | ||
define void @test() nounwind { | ||
; CHECK-LABEL: test: | ||
; CHECK: // %bb.0: // %entry | ||
; CHECK-NEXT: sub sp, sp, #16 // =16 | ||
; CHECK-NEXT: mov x1, xzr | ||
; CHECK-NEXT: mov x0, x1 | ||
; CHECK-NEXT: str x1, [sp] // 8-byte Folded Spill | ||
; CHECK-NEXT: str x0, [sp, #8] // 8-byte Folded Spill | ||
; CHECK-NEXT: b .LBB0_1 | ||
; CHECK-NEXT: .LBB0_1: // %loop | ||
; CHECK-NEXT: // =>This Inner Loop Header: Depth=1 | ||
; CHECK-NEXT: ldr x0, [sp, #8] // 8-byte Folded Reload | ||
; CHECK-NEXT: ldr x1, [sp] // 8-byte Folded Reload | ||
; CHECK-NEXT: str x1, [sp] // 8-byte Folded Spill | ||
; CHECK-NEXT: str x0, [sp, #8] // 8-byte Folded Spill | ||
; CHECK-NEXT: b .LBB0_1 | ||
entry: | ||
br label %loop | ||
|
||
loop: | ||
%p = phi i72 [ 0, %entry ], [ %p, %loop ] | ||
br label %loop | ||
} |