[llvm] r318398 - [ARM GlobalISel] Add tests for BIC. NFC
Friedman, Eli via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 12:36:51 PST 2017
On 11/20/2017 1:44 AM, Diana Picus wrote:
> Hi Eli,
>
> This is supposed to test the code generated by TableGen for
> defm BIC : AsI1_bin_irs<0b1110, "bic",
> IIC_iBITi, IIC_iBITr, IIC_iBITsr,
> BinOpFrag<(and node:$LHS, (not node:$RHS))>>;
> where 'not' is a 'xor' with -1 (we don't have a G_NOT opcode).
>
> I agree that it looks weird and not very likely to occur much in
> practice, but I think it's useful for making sure that TableGen does
> what we'd expect for AsI1_bin_irs with a BinOpFrag as opposed to just
> a simple node like the other AsI1_bin_irs patterns.
The pattern we normally use to match BICri is a separate pattern,
"(and GPR:$src, mod_imm_not:$imm)". I didn't realize we actually
generated a pattern for NOT of an i32 immediate; it's not a pattern
which would ever match with SelectionDAG.
Please add a comment noting this. And please add a testcase for the
BICri pattern we normally use.
-Eli
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
More information about the llvm-commits
mailing list