diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-07-23 01:47:52 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-07-23 01:47:52 +0000 |
commit | 2bb20fd2bf37d9a608a89b7253881a59686ed2e4 (patch) | |
tree | 5a812ea77d725aecc5c03f8f32d14ef4c4d6afa7 /lib/Target/R600/AMDGPUInstructions.td | |
parent | d7a472c9c696ebf010835d9254fb15036e558d84 (diff) | |
download | external_llvm-2bb20fd2bf37d9a608a89b7253881a59686ed2e4.zip external_llvm-2bb20fd2bf37d9a608a89b7253881a59686ed2e4.tar.gz external_llvm-2bb20fd2bf37d9a608a89b7253881a59686ed2e4.tar.bz2 |
R600: Clean up extended load patterns
Reviewed-by: Vincent Lejeune <vljn at ovi.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/R600/AMDGPUInstructions.td')
-rw-r--r-- | lib/Target/R600/AMDGPUInstructions.td | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/Target/R600/AMDGPUInstructions.td b/lib/Target/R600/AMDGPUInstructions.td index 7197c61..b3cbe99 100644 --- a/lib/Target/R600/AMDGPUInstructions.td +++ b/lib/Target/R600/AMDGPUInstructions.td @@ -92,11 +92,27 @@ def az_extload : PatFrag<(ops node:$ptr), (unindexedload node:$ptr), [{ L->getExtensionType() == ISD::EXTLOAD; }]>; -def zextloadi8_global : PatFrag<(ops node:$ptr), (zextloadi8 node:$ptr), [{ +def az_extloadi8 : PatFrag<(ops node:$ptr), (az_extload node:$ptr), [{ + return cast<LoadSDNode>(N)->getMemoryVT() == MVT::i8; +}]>; + +def az_extloadi8_global : PatFrag<(ops node:$ptr), (az_extloadi8 node:$ptr), [{ + return isGlobalLoad(dyn_cast<LoadSDNode>(N)); +}]>; + +def az_extloadi8_constant : PatFrag<(ops node:$ptr), (az_extloadi8 node:$ptr), [{ + return isGlobalLoad(dyn_cast<LoadSDNode>(N)); +}]>; + +def az_extloadi16 : PatFrag<(ops node:$ptr), (az_extload node:$ptr), [{ + return cast<LoadSDNode>(N)->getMemoryVT() == MVT::i16; +}]>; + +def az_extloadi16_global : PatFrag<(ops node:$ptr), (az_extloadi16 node:$ptr), [{ return isGlobalLoad(dyn_cast<LoadSDNode>(N)); }]>; -def zextloadi8_constant : PatFrag<(ops node:$ptr), (zextloadi8 node:$ptr), [{ +def az_extloadi16_constant : PatFrag<(ops node:$ptr), (az_extloadi16 node:$ptr), [{ return isGlobalLoad(dyn_cast<LoadSDNode>(N)); }]>; |