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] Fix NZCV reg live-in bug in F128CSEL codegen.
When generating the IfTrue basic block during the F128CSEL pseudo-instruction handling, the NZCV live-in for the newly created BB wasn't being added. This caused a fault during MI-sched/live range calculation when the predecessor for the fall-through BB didn't have a live-in for phys-reg as expected. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193316 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
2 changed files
with
23 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,17 @@ | ||
; RUN: llc -mtriple=aarch64-none-linux-gnu -verify-machineinstrs < %s | ||
|
||
; Regression test for NZCV reg live-in not being added to fp128csel IfTrue BB, | ||
; causing a crash during live range calc. | ||
define void @fp128_livein(i64 %a) { | ||
%tobool = icmp ne i64 %a, 0 | ||
%conv = zext i1 %tobool to i32 | ||
%conv2 = sitofp i32 %conv to fp128 | ||
%conv6 = sitofp i32 %conv to double | ||
%call3 = tail call i32 @g(fp128 %conv2) | ||
%call8 = tail call i32 @h(double %conv6) | ||
ret void | ||
} | ||
|
||
declare i32 @f() | ||
declare i32 @g(fp128) | ||
declare i32 @h(double) |