- Logic such as this quite possibly should be optional builder
behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59213
91177308-0d34-0410-b5e6-
96231b3b80d8
llvm::Value *Val = Builder.CreateLoad(Ptr, LV.isVolatileQualified(), "tmp");
// Shift to proper location.
- Val = Builder.CreateLShr(Val, llvm::ConstantInt::get(EltTy, StartBit),
- "bf.lo");
+ if (StartBit)
+ Val = Builder.CreateLShr(Val, llvm::ConstantInt::get(EltTy, StartBit),
+ "bf.lo");
// Mask off unused bits.
llvm::Constant *LowMask =