Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[InstCombine] Update assertions in InstCombine test; NFC
- Loading branch information
1 parent
111c932
commit 4243bd4
Showing
1 changed file
with
19 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,32 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt < %s -instcombine -S -o - | FileCheck %s | ||
|
||
; CHECK-LABEL: @a( | ||
define i32 @a(<4 x i64> %I) { | ||
; CHECK-LABEL: @a( | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: [[TMP0:%.*]] = extractelement <4 x i64> [[I:%.*]], i32 3 | ||
; CHECK-NEXT: [[K:%.*]] = trunc i64 [[TMP0]] to i32 | ||
; CHECK-NEXT: ret i32 [[K]] | ||
; | ||
entry: | ||
; CHECK-NOT: trunc <4 x i64> | ||
%J = trunc <4 x i64> %I to <4 x i32> | ||
%K = extractelement <4 x i32> %J, i32 3 | ||
; CHECK: extractelement <4 x i64> | ||
; CHECK: trunc i64 | ||
; CHECK: ret | ||
ret i32 %K | ||
%J = trunc <4 x i64> %I to <4 x i32> | ||
%K = extractelement <4 x i32> %J, i32 3 | ||
ret i32 %K | ||
} | ||
|
||
|
||
; CHECK-LABEL: @b( | ||
define i32 @b(<4 x float> %I) { | ||
; CHECK-LABEL: @b( | ||
; CHECK-NEXT: entry: | ||
; CHECK-NEXT: [[TMP0:%.*]] = extractelement <4 x float> [[I:%.*]], i32 3 | ||
; CHECK-NEXT: [[K:%.*]] = fptosi float [[TMP0]] to i32 | ||
; CHECK-NEXT: ret i32 [[K]] | ||
; | ||
entry: | ||
; CHECK-NOT: fptosi <4 x float> | ||
%J = fptosi <4 x float> %I to <4 x i32> | ||
%K = extractelement <4 x i32> %J, i32 3 | ||
; CHECK: extractelement <4 x float> | ||
; CHECK: fptosi float | ||
; CHECK: ret | ||
ret i32 %K | ||
%J = fptosi <4 x float> %I to <4 x i32> | ||
%K = extractelement <4 x i32> %J, i32 3 | ||
ret i32 %K | ||
} | ||
|