diff options
| author | Michel Danzer <michel.daenzer@amd.com> | 2014-02-05 09:48:05 +0000 |
|---|---|---|
| committer | Michel Danzer <michel.daenzer@amd.com> | 2014-02-05 09:48:05 +0000 |
| commit | 5d26fdfcba22a5ce7eb5fcfb5c8f156b5d617c14 (patch) | |
| tree | 2a4282575a477bf5f72549f4fcde76261de6cac5 /llvm/lib | |
| parent | bc9486bea08428b9137b9a5404d8fdadc8b16a54 (diff) | |
| download | bcm5719-llvm-5d26fdfcba22a5ce7eb5fcfb5c8f156b5d617c14.tar.gz bcm5719-llvm-5d26fdfcba22a5ce7eb5fcfb5c8f156b5d617c14.zip | |
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>
llvm-svn: 200830
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/R600/SIInstructions.td | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/R600/SIInstructions.td b/llvm/lib/Target/R600/SIInstructions.td index ba77e6d9ac7..25fd7d50508 100644 --- a/llvm/lib/Target/R600/SIInstructions.td +++ b/llvm/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), |

