Skip to content
Snippets Groups Projects
Commit 99cce60d authored by Haochen Gui's avatar Haochen Gui
Browse files

optabs: make prepare_cmp_insn goto fail when cbranchcc4 checks unsatisfied

prepare_cmp_insn is a help function to generate comparison rtx.
It should not assume that cbranchcc4 exists and all sub-CC modes
are supported on a target.  When the check fails, it could go to
fail and return a NULL rtx as its callers check the return value
for CCmode.

The test case (gcc.target/powerpc/cbranchcc4-1.c) which covers
failure path will be committed with an rs6000 specific patch.

2022-12-05  Haochen Gui <guihaoc@linux.ibm.com>

gcc/
	* optabs.cc (prepare_cmp_insn): Return a NULL rtx other than
	assertion failure when targets don't have cbranch optab or
	predicate check fails.
parent 1728c537
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment