Skip to content

Commit

Permalink
fixup! [AIE2P] Add fifo store intrinsics - IR lowering
Browse files Browse the repository at this point in the history
  • Loading branch information
khallouh committed Jan 24, 2025
1 parent eec639b commit be6981a
Show file tree
Hide file tree
Showing 2 changed files with 655 additions and 612 deletions.
8 changes: 4 additions & 4 deletions clang/lib/Headers/aie2p_ldst.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ INTRINSIC(v128uint8) unpack(v128uint4 v) { return unpack(v, __SIGN_UNSIGNED); }

#define FIFO_ST_PUSH_NORMAL(T) \
INTRINSIC(void) fifo_st_reset(T *&p, T v, fifo_state_t &s) { \
int pos = 0; \
s.pos = 0; \
sparse_fifo_t &fifo = s.fifo; \
__builtin_aie2p_fifo_st_push_512_bfp16((int *&)p, v, fifo, pos); \
__builtin_aie2p_fifo_st_push_512_bfp16((int *&)p, v, fifo, (int &)s.pos); \
} \
INTRINSIC(void) fifo_st_push(T *&p, T v, fifo_state_t &s) { \
int &pos = s.pos; \
Expand All @@ -95,12 +95,12 @@ INTRINSIC(v128uint8) unpack(v128uint4 v) { return unpack(v, __SIGN_UNSIGNED); }

#define FIFO_ST_PUSH_BFP16(T, SIZE) \
INTRINSIC(void) fifo_st_reset(T##_unaligned *&p, T v, fifo_state_t &s) { \
int pos = 0; \
s.pos = 0; \
sparse_fifo_t &fifo = s.fifo; \
v64char mant = v.mantissa; \
v8char exp = v.exponent; \
__builtin_aie2p_fifo_st_push_##SIZE##_bfp16((int *&)p, mant, exp, fifo, \
pos); \
(int &)s.pos); \
} \
INTRINSIC(void) fifo_st_push(T##_unaligned *&p, T v, fifo_state_t &s) { \
int &pos = s.pos; \
Expand Down
Loading

0 comments on commit be6981a

Please sign in to comment.