From: Ulrich Weigand Date: Thu, 20 Dec 2018 14:24:17 +0000 (+0000) Subject: [SystemZ] "Generic" vector assembler instructions shoud clobber CC X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a564872860d40c198c1f5c5b3422046968aa63c6;p=llvm [SystemZ] "Generic" vector assembler instructions shoud clobber CC There are several vector instructions which may or may not set the condition code register, depending on the value of an argument. For codegen, we use two versions of the instruction, one that sets CC and one that doesn't, which hard-code appropriate values of that argument. But we also have a "generic" version of the instruction that is used for the assembler/disassembler. These generic versions should always be considered to clobber CC just to be safe. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349761 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/SystemZ/SystemZInstrFormats.td b/lib/Target/SystemZ/SystemZInstrFormats.td index e3f9a9645d1..1e904a86ea7 100644 --- a/lib/Target/SystemZ/SystemZInstrFormats.td +++ b/lib/Target/SystemZ/SystemZInstrFormats.td @@ -2900,7 +2900,7 @@ multiclass UnaryExtraVRRaSPair opcode, } multiclass UnaryExtraVRRaSPairGeneric opcode> { - let M4 = 0 in + let M4 = 0, Defs = [CC] in def "" : InstVRRa; @@ -3472,7 +3472,9 @@ multiclass BinaryVRRbSPair opcode, class BinaryVRRbSPairGeneric opcode> : InstVRRb; + mnemonic#"\t$V1, $V2, $V3, $M4, $M5", []> { + let Defs = [CC]; +} // Declare a pair of instructions, one which sets CC and one which doesn't. // The CC-setting form ends with "S" and sets the low bit of M5. @@ -3496,9 +3498,10 @@ multiclass BinaryExtraVRRbSPair opcode, } multiclass BinaryExtraVRRbSPairGeneric opcode> { - def "" : InstVRRb; + let Defs = [CC] in + def "" : InstVRRb; def : InstAlias(NAME) VR128:$V1, VR128:$V2, VR128:$V3, imm32zx4:$M4, 0)>; @@ -4185,9 +4188,10 @@ multiclass TernaryOptVRRbSPair opcode, } multiclass TernaryOptVRRbSPairGeneric opcode> { - def "" : InstVRRb; + let Defs = [CC] in + def "" : InstVRRb; def : InstAlias(NAME) VR128:$V1, VR128:$V2, VR128:$V3, imm32zx4:$M4, 0)>; @@ -4385,7 +4389,8 @@ multiclass QuaternaryOptVRRdSPair opcode, } multiclass QuaternaryOptVRRdSPairGeneric opcode> { - def "" : QuaternaryVRRdGeneric; + let Defs = [CC] in + def "" : QuaternaryVRRdGeneric; def : InstAlias(NAME) VR128:$V1, VR128:$V2, VR128:$V3, VR128:$V4, imm32zx4:$M5, 0)>;