ac: add ac_atomic_inc_wrap / ac_atomic_dec_wrap support
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 24 Jul 2019 10:09:31 +0000 (12:09 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 6 Aug 2019 21:41:03 +0000 (17:41 -0400)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/amd/common/ac_llvm_build.c
src/amd/common/ac_llvm_build.h

index 0943d0364ddabc33bd041be5f5a049551f00c873..24970769b87472d5c542d5f6adbdd56d1b2c06e8 100644 (file)
@@ -2580,6 +2580,8 @@ static const char *get_atomic_name(enum ac_atomic_op op)
        case ac_atomic_and: return "and";
        case ac_atomic_or: return "or";
        case ac_atomic_xor: return "xor";
+       case ac_atomic_inc_wrap: return "inc";
+       case ac_atomic_dec_wrap: return "dec";
        }
        unreachable("bad atomic op");
 }
index e460d14e177684b1eceaf64e16943cfb795dd082..082201fb048fd6af60ac3e382fcb6b8b2d3ddd43 100644 (file)
@@ -516,6 +516,8 @@ enum ac_atomic_op {
        ac_atomic_and,
        ac_atomic_or,
        ac_atomic_xor,
+       ac_atomic_inc_wrap,
+       ac_atomic_dec_wrap,
 };
 
 enum ac_image_dim {