[AMDGPU] Minor cleanup after D109483. NFC.
authorJay Foad <jay.foad@amd.com>
Mon, 13 Sep 2021 08:04:30 +0000 (09:04 +0100)
committerJay Foad <jay.foad@amd.com>
Mon, 13 Sep 2021 09:27:15 +0000 (10:27 +0100)
llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp

index 60e79c2..991fa13 100644 (file)
@@ -1314,7 +1314,7 @@ bool AMDGPUCodeGenPrepare::visitLoadInst(LoadInst &I) {
       ConstantInt *Lower =
         mdconst::extract<ConstantInt>(Range->getOperand(0));
 
-      if (Lower->getValue().isNullValue()) {
+      if (Lower->isNullValue()) {
         WidenLoad->setMetadata(LLVMContext::MD_range, nullptr);
       } else {
         Metadata *LowAndHigh[] = {
index 71406ab..ecdbdf6 100644 (file)
@@ -505,7 +505,7 @@ bool GCNTTIImpl::getTgtMemIntrinsic(IntrinsicInst *Inst,
     Info.Ordering = static_cast<AtomicOrdering>(OrderingVal);
     Info.ReadMem = true;
     Info.WriteMem = true;
-    Info.IsVolatile = !Volatile->isNullValue();
+    Info.IsVolatile = !Volatile->isZero();
     return true;
   }
   default: