summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichel Danzer <michel.daenzer@amd.com>2014-02-05 09:48:05 +0000
committerMichel Danzer <michel.daenzer@amd.com>2014-02-05 09:48:05 +0000
commitcf4061a6016ebcac39ac59f994e6332395f260e1 (patch)
tree26b30636c2c5ab8316c1b9875dce2feb7200dc6f /lib
parent51dd765139492453032a08e3139bc6e0be3af137 (diff)
downloadllvm-cf4061a6016ebcac39ac59f994e6332395f260e1.tar.gz
llvm-cf4061a6016ebcac39ac59f994e6332395f260e1.tar.bz2
llvm-cf4061a6016ebcac39ac59f994e6332395f260e1.tar.xz
R600/SI: Add pattern for zero-extending i1 to i32
Fixes opencl-example if_* tests with radeonsi. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74469 Reviewed-by: Tom Stellard <thomas.stellard@amd.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200830 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/R600/SIInstructions.td5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td
index ba77e6d9ac..25fd7d5050 100644
--- a/lib/Target/R600/SIInstructions.td
+++ b/lib/Target/R600/SIInstructions.td
@@ -1838,6 +1838,11 @@ def : Pat <
(V_CNDMASK_B32_e64 (i32 0), (i32 -1), $src0)
>;
+def : Pat <
+ (i32 (zext i1:$src0)),
+ (V_CNDMASK_B32_e64 (i32 0), (i32 1), $src0)
+>;
+
// 1. Offset as 8bit DWORD immediate
def : Pat <
(SIload_constant i128:$sbase, IMM8bitDWORD:$offset),