[PATCH] D23359: [x86] X86ISelLowering zext(add_nuw(x, C)) --> add(zext(x), C_zext)

Artur Pilipenko via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 10 09:44:49 PDT 2016


apilipenko created this revision.
apilipenko added a reviewer: spatel.
apilipenko added a subscriber: llvm-commits.

Currently X86ISelLowering has a similar transformation for sexts:
sext(add_nsw(x, C)) --> add(sext(x), C_sext)
See D13757 for motivation. 

In this change I extend this code to handle zexts as well.

https://reviews.llvm.org/D23359

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/add-nuw-zext.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23359.67539.patch
Type: text/x-patch
Size: 4888 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160810/7281d512/attachment.bin>


More information about the llvm-commits mailing list