[PATCH] add a convenience method to copy wrapping, exact, and fast-math flags (NFC)

Sanjay Patel spatel at rotateright.com
Sun Aug 31 17:14:58 PDT 2014


Hi aschwaighofer, nadav, hfinkel,

The loop vectorizer preserves wrapping, exact, and fast-math properties of scalar instructions. This patch adds a convenience method to make that operation easier because we need to do this in the loop vectorizer, SLP vectorizer, and possibly other places.

Although this is a 'no functional change' patch, I've added a testcase to verify that the exact flag is preserved by the loop vectorizer. The wrapping and fast-math flags are already checked in existing testcases.

This is a preliminary patch to enable a fix for:
http://llvm.org/bugs/show_bug.cgi?id=20802 
[SLP vectorizer] fast-math and wrap/exact flags are not preserved.

http://reviews.llvm.org/D5138

Files:
  include/llvm/IR/InstrTypes.h
  lib/IR/Instructions.cpp
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/exact.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5138.13131.patch
Type: text/x-patch
Size: 3652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140901/b811e110/attachment.bin>


More information about the llvm-commits mailing list