[PATCH] D79753: [mlir][StandardToSPIRV] Fix a bug in loading a non-i32 value.
    Han-Chung Wang via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon May 11 17:18:47 PDT 2020
    
    
  
hanchung added inline comments.
================
Comment at: mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp:665
+
+  // If the number is negative, we should do a sign extention.
+  IntegerAttr shiftValueAttr =
----------------
It seems that we should check the signedness semantics of dstType?
This looks like we should apply following sign extension if `srcType.isSignedInteger()` returns true, and shouldn't apply it if `srcType.isUnsignedInteger()` returns true. In case of it is signless, ie `srcType.isSignlessInteger()` returns true, I don't know what should we do. It seems an undef to me.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79753/new/
https://reviews.llvm.org/D79753
    
    
More information about the llvm-commits
mailing list