From d2a07eebcd81239f7018c4b7065837d607f3a72b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 19 Dec 2005 00:19:21 +0000 Subject: [PATCH] add bool truncstores llvm-svn: 24845 --- llvm/lib/Target/SparcV8/SparcV8InstrInfo.td | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/llvm/lib/Target/SparcV8/SparcV8InstrInfo.td b/llvm/lib/Target/SparcV8/SparcV8InstrInfo.td index 02e1a002032d..3c9b8d433587 100644 --- a/llvm/lib/Target/SparcV8/SparcV8InstrInfo.td +++ b/llvm/lib/Target/SparcV8/SparcV8InstrInfo.td @@ -721,3 +721,9 @@ def : Pat<(i32 (extload ADDRrr:$src, i8)), (LDUBrr ADDRrr:$src)>; def : Pat<(i32 (extload ADDRri:$src, i8)), (LDUBri ADDRri:$src)>; def : Pat<(i32 (extload ADDRrr:$src, i16)), (LDUHrr ADDRrr:$src)>; def : Pat<(i32 (extload ADDRri:$src, i16)), (LDUHri ADDRri:$src)>; + +// truncstore bool -> truncstore byte. +def : Pat<(truncstore IntRegs:$src, ADDRrr:$addr, i1), + (STBrr IntRegs:$src, ADDRrr:$addr)>; +def : Pat<(truncstore IntRegs:$src, ADDRri:$addr, i1), + (STBri IntRegs:$src, ADDRri:$addr)>;