[PATCH] use an integer constant for FABS / FNEG (x86)

David Majnemer david.majnemer at gmail.com
Mon Aug 25 13:37:39 PDT 2014


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:12124
@@ -12129,1 +12123,3 @@
+  unsigned EltBits = EltVT.getSizeInBits();
+  Constant *C = ConstantInt::get(*Context, ~APInt::getSignBit(EltBits));
   C = ConstantVector::getSplat(NumElts, C);
----------------
I think you can replace `~APInt::getSignBit(EltBits)` with `APInt::getSignedMaxValue(EltBits)`

http://reviews.llvm.org/D5052






More information about the llvm-commits mailing list