Ignore:
Timestamp:
Jun 15, 2017, 12:39:20 PM (2 years ago)
Author:
nmedfort
Message:

Back up check-in. Should have no effect on current programs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/CBuilder.h

    r5493 r5510  
    180180    void CreateAssert(llvm::Value * assertion, llvm::StringRef failureMessage) {
    181181        if (LLVM_UNLIKELY(assertion->getType()->isVectorTy())) {
    182             assertion = CreateBitCast(assertion, llvm::IntegerType::get(getContext(), assertion->getType()->getPrimitiveSizeInBits()));
     182            assertion = CreateBitCast(assertion, getIntNTy(assertion->getType()->getPrimitiveSizeInBits()));
    183183        }
    184         return __CreateAssert(CreateICmpNE(assertion, llvm::Constant::getNullValue(assertion->getType())), failureMessage);
     184        return __CreateAssert(CreateIsNotNull(assertion), failureMessage);
    185185    }
    186186
    187187    void CreateAssertZero(llvm::Value * assertion, llvm::StringRef failureMessage) {
    188188        if (LLVM_UNLIKELY(assertion->getType()->isVectorTy())) {
    189             assertion = CreateBitCast(assertion, llvm::IntegerType::get(getContext(), assertion->getType()->getPrimitiveSizeInBits()));
     189            assertion = CreateBitCast(assertion, getIntNTy(assertion->getType()->getPrimitiveSizeInBits()));
    190190        }
    191         return __CreateAssert(CreateICmpEQ(assertion, llvm::Constant::getNullValue(assertion->getType())), failureMessage);
     191        return __CreateAssert(CreateIsNull(assertion), failureMessage);
    192192    }
    193193
Note: See TracChangeset for help on using the changeset viewer.