This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RTL Expand pass - Difference in float and int datatypes
- From: Anitha Boyapati <anitha dot boyapati at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 9 Feb 2011 13:52:23 +0530
- Subject: RTL Expand pass - Difference in float and int datatypes
Hello All,
I am trying to understand rtl generation. For the following testcase
I have dumped the rtl... (version: gcc-4.3.3, target: AVR32 not
upstreamed yet)
int main() {
??????? volatile int a, b;
??????? if(a>b) return 1;
??????? else return 2;
}
Expand pass shows that "le"operator is chosen.
(jump_insn 9 8 10 3 gt_int.c:4 (set (pc)
(if_then_else (le:CC (cc0)
(const_int 0 [0x0]))
(label_ref 14)
(pc))) -1 (nil))
If I modify the same testcase to use 'float' datatype instead of
'int', "gt" operator is picked up.
(jump_insn 9 8 34 3 gt.c:4 (set (pc)
(if_then_else (gt:CC (cc0)
(const_int 0 [0x0]))
(label_ref 12)
(pc))) -1 (nil))
I would like to know what prompts gcc to decide if "le" can be used in
the expand pass rather than "gt" operator. Or more precisely why it
differs incase of float.
I am not sure how much of this is target dependent, but the port being
used is for avr32 which is not upstream yet. It will be great if I
can get some pointers on the above.
Regards
Anitha