diff options
author | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-08 10:00:56 +0000 |
---|---|---|
committer | bernds <bernds@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-08 10:00:56 +0000 |
commit | e00aecfca2ab573420db79fe389d5b904757527f (patch) | |
tree | f14bfed275a2a46078d991657d01af4f93a790ef /gcc/cselib.c | |
parent | 79141bb7a30e8eebd0c82ab56974167793f13958 (diff) | |
download | gcc-e00aecfca2ab573420db79fe389d5b904757527f.tar.gz |
Make cselib COND_EXEC-safe
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44713 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r-- | gcc/cselib.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c index 6497de0bbc7..13117668006 100644 --- a/gcc/cselib.c +++ b/gcc/cselib.c @@ -1179,8 +1179,15 @@ cselib_record_sets (insn) int i; struct set sets[MAX_SETS]; rtx body = PATTERN (insn); + rtx cond = 0; body = PATTERN (insn); + if (GET_CODE (body) == COND_EXEC) + { + cond = COND_EXEC_TEST (body); + body = COND_EXEC_CODE (body); + } + /* Find all sets. */ if (GET_CODE (body) == SET) { @@ -1219,6 +1226,9 @@ cselib_record_sets (insn) /* We don't know how to record anything but REG or MEM. */ if (GET_CODE (dest) == REG || GET_CODE (dest) == MEM) { + rtx src = sets[i].src; + if (cond) + src = gen_rtx_IF_THEN_ELSE (GET_MODE (src), cond, src, dest); sets[i].src_elt = cselib_lookup (sets[i].src, GET_MODE (dest), 1); if (GET_CODE (dest) == MEM) sets[i].dest_addr_elt = cselib_lookup (XEXP (dest, 0), Pmode, 1); |