[PATCH] D25485: [x86] use 'neg' for negation of bool

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 13 10:31:06 PDT 2016


spatel added subscribers: jonpa, uweigand.
spatel added a comment.

Looking closer at the SystemZ regression test differences, we have more instructions with the LegalizeDAG patch, so I think that target is missing a pattern ( cc'ing @uweigand  and @jonpa ).

Example - the current code for test 'f7' in test/CodeGen/SystemZ/branch-07.ll is:

  cr  %r2, %r3
  ipm %r0
  afi %r0, -268435456
  sra %r0, 31
  srlg  %r1, %r3, 32
  srlg  %r2, %r2, 32
  cr  %r2, %r1
  ipm %r1
  afi %r1, -268435456
  sra %r1, 31
  sllg  %r2, %r1, 32
  lr  %r2, %r0
  br  %r14

With the LegalizeDAG patch, it becomes:

  cr  %r2, %r3
  ipm %r0
  afi %r0, -268435456
  srl %r0, 31
  lcr %r0, %r0
  srlg  %r1, %r3, 32
  srlg  %r2, %r2, 32
  cr  %r2, %r1
  ipm %r1
  afi %r1, -268435456
  srl %r1, 31
  lcr %r1, %r1
  sllg  %r2, %r1, 32
  lr  %r2, %r0
  br  %r14


https://reviews.llvm.org/D25485





More information about the llvm-commits mailing list