forked from GPUOpen-Drivers/llvm-project
-
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.
Merged master:b7e2358220f into amd-gfx:e9e04d625cc
Local branch amd-gfx e9e04d6 Merged master:ff6a0b6a8ee into amd-gfx:9f5a06205c0 Remote branch master b7e2358 Remove getNumUses() comparisons (NFC)
- Loading branch information
Showing
8 changed files
with
58 additions
and
8 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
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
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
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,40 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py | ||
; RUN: opt -S -mergefunc < %s | FileCheck %s | ||
|
||
define internal <2 x i32> @test1(<2 x i32> %v1, <2 x i32> %v2) { | ||
; CHECK-LABEL: @test1( | ||
; CHECK-NEXT: [[X:%.*]] = shufflevector <2 x i32> [[V1:%.*]], <2 x i32> [[V2:%.*]], <2 x i32> <i32 0, i32 1> | ||
; CHECK-NEXT: ret <2 x i32> [[X]] | ||
; | ||
%x = shufflevector <2 x i32> %v1, <2 x i32> %v2, <2 x i32> <i32 0, i32 1> | ||
ret <2 x i32> %x | ||
} | ||
|
||
; Same mask as test1. | ||
define internal <2 x i32> @test2(<2 x i32> %v1, <2 x i32> %v2) { | ||
%x = shufflevector <2 x i32> %v1, <2 x i32> %v2, <2 x i32> <i32 0, i32 1> | ||
ret <2 x i32> %x | ||
} | ||
|
||
; Different mask than test1, don't merge. | ||
define internal <2 x i32> @test3(<2 x i32> %v1, <2 x i32> %v2) { | ||
; CHECK-LABEL: @test3( | ||
; CHECK-NEXT: [[X:%.*]] = shufflevector <2 x i32> [[V1:%.*]], <2 x i32> [[V2:%.*]], <2 x i32> <i32 1, i32 0> | ||
; CHECK-NEXT: ret <2 x i32> [[X]] | ||
; | ||
%x = shufflevector <2 x i32> %v1, <2 x i32> %v2, <2 x i32> <i32 1, i32 0> | ||
ret <2 x i32> %x | ||
} | ||
|
||
define void @caller(<2 x i32> %v1, <2 x i32> %v2) { | ||
; CHECK-LABEL: @caller( | ||
; CHECK-NEXT: [[TMP1:%.*]] = call <2 x i32> @test1(<2 x i32> [[V1:%.*]], <2 x i32> [[V2:%.*]]) | ||
; CHECK-NEXT: [[TMP2:%.*]] = call <2 x i32> @test1(<2 x i32> [[V1]], <2 x i32> [[V2]]) | ||
; CHECK-NEXT: [[TMP3:%.*]] = call <2 x i32> @test3(<2 x i32> [[V1]], <2 x i32> [[V2]]) | ||
; CHECK-NEXT: ret void | ||
; | ||
call <2 x i32> @test1(<2 x i32> %v1, <2 x i32> %v2) | ||
call <2 x i32> @test2(<2 x i32> %v1, <2 x i32> %v2) | ||
call <2 x i32> @test3(<2 x i32> %v1, <2 x i32> %v2) | ||
ret void | ||
} |